Skip to content

Commit

Permalink
Updates minimum supported SDK version to Flutter 3.3/Dart 3.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
lijy91 committed Feb 21, 2024
1 parent f2faa4e commit 5a7f46e
Show file tree
Hide file tree
Showing 19 changed files with 100 additions and 250 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@
"contributions": [
"code"
]
},
{
"login": "Leobuaa",
"name": "Leo Peng",
"avatar_url": "https://avatars.githubusercontent.com/u/6970283?v=4",
"profile": "https://github.com/Leobuaa",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.1

* Updates minimum supported SDK version to Flutter 3.3/Dart 3.0.
* [android] fix: NPE crash problem #14

## 0.2.0

* Add mobile support (#8) @ademar111190
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 LiJianying <[email protected]>
Copyright (c) 2022-2024 LiJianying <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 2 additions & 11 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,7 @@

```yaml
dependencies:
clipboard_watcher: ^0.2.0
```
```yaml
dependencies:
clipboard_watcher:
git:
url: https://github.com/leanflutter/clipboard_watcher.git
ref: main
clipboard_watcher: ^0.2.1
```
### 用法
Expand Down Expand Up @@ -119,6 +109,7 @@ class _HomePageState extends State<HomePage> with ClipboardListener {
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ademar111190"><img src="https://avatars.githubusercontent.com/u/1225438?v=4?s=100" width="100px;" alt="Ademar"/><br /><sub><b>Ademar</b></sub></a><br /><a href="https://github.com/leanflutter/clipboard_watcher/commits?author=ademar111190" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://customersuccessbox.com/"><img src="https://avatars.githubusercontent.com/u/64081899?v=4?s=100" width="100px;" alt="Amritpal Singh"/><br /><sub><b>Amritpal Singh</b></sub></a><br /><a href="https://github.com/leanflutter/clipboard_watcher/commits?author=boparaiamritcsb" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jpnurmi"><img src="https://avatars.githubusercontent.com/u/140617?v=4?s=100" width="100px;" alt="J-P Nurmi"/><br /><sub><b>J-P Nurmi</b></sub></a><br /><a href="https://github.com/leanflutter/clipboard_watcher/commits?author=jpnurmi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Leobuaa"><img src="https://avatars.githubusercontent.com/u/6970283?v=4?s=100" width="100px;" alt="Leo Peng"/><br /><sub><b>Leo Peng</b></sub></a><br /><a href="https://github.com/leanflutter/clipboard_watcher/commits?author=Leobuaa" title="Code">💻</a></td>
</tr>
</tbody>
<tfoot>
Expand Down
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ dependencies:
clipboard_watcher: ^0.2.0
```
Or
```yaml
dependencies:
clipboard_watcher:
git:
url: https://github.com/leanflutter/clipboard_watcher.git
ref: main
```
### Usage
```dart
Expand Down Expand Up @@ -120,6 +110,7 @@ class _HomePageState extends State<HomePage> with ClipboardListener {
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ademar111190"><img src="https://avatars.githubusercontent.com/u/1225438?v=4?s=100" width="100px;" alt="Ademar"/><br /><sub><b>Ademar</b></sub></a><br /><a href="https://github.com/leanflutter/clipboard_watcher/commits?author=ademar111190" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://customersuccessbox.com/"><img src="https://avatars.githubusercontent.com/u/64081899?v=4?s=100" width="100px;" alt="Amritpal Singh"/><br /><sub><b>Amritpal Singh</b></sub></a><br /><a href="https://github.com/leanflutter/clipboard_watcher/commits?author=boparaiamritcsb" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jpnurmi"><img src="https://avatars.githubusercontent.com/u/140617?v=4?s=100" width="100px;" alt="J-P Nurmi"/><br /><sub><b>J-P Nurmi</b></sub></a><br /><a href="https://github.com/leanflutter/clipboard_watcher/commits?author=jpnurmi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Leobuaa"><img src="https://avatars.githubusercontent.com/u/6970283?v=4?s=100" width="100px;" alt="Leo Peng"/><br /><sub><b>Leo Peng</b></sub></a><br /><a href="https://github.com/leanflutter/clipboard_watcher/commits?author=Leobuaa" title="Code">💻</a></td>
</tr>
</tbody>
<tfoot>
Expand Down
5 changes: 1 addition & 4 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
include: package:flutter_lints/flutter.yaml

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
include: package:mostly_reasonable_lints/flutter.yaml
30 changes: 1 addition & 29 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
include: package:mostly_reasonable_lints/flutter.yaml
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
42 changes: 21 additions & 21 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// ignore_for_file: avoid_print

import 'package:clipboard_watcher/clipboard_watcher.dart';
import 'package:flutter/material.dart';

import 'package:flutter/services.dart';
import 'package:clipboard_watcher/clipboard_watcher.dart';

void main() {
runApp(const MyApp());
}

class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});

@override
State<MyApp> createState() => _MyAppState();
Expand All @@ -31,30 +30,31 @@ class _MyAppState extends State<MyApp> with ClipboardListener {
title: const Text('Plugin example app'),
),
body: Center(
child: Column(
children: [
ElevatedButton(
child: const Text('start'),
onPressed: () {
clipboardWatcher.start();
},
),
ElevatedButton(
child: const Text('stop'),
onPressed: () {
clipboardWatcher.stop();
},
),
],
)),
child: Column(
children: [
ElevatedButton(
child: const Text('start'),
onPressed: () {
clipboardWatcher.start();
},
),
ElevatedButton(
child: const Text('stop'),
onPressed: () {
clipboardWatcher.stop();
},
),
],
),
),
),
);
}

@override
void onClipboardChanged() async {
Future<void> onClipboardChanged() async {
ClipboardData? newClipboardData =
await Clipboard.getData(Clipboard.kTextPlain);
print(newClipboardData?.text ?? "");
print(newClipboardData?.text ?? '');
}
}
2 changes: 1 addition & 1 deletion example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7

COCOAPODS: 1.11.3
COCOAPODS: 1.14.3
2 changes: 1 addition & 1 deletion example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit 5a7f46e

Please sign in to comment.