diff --git a/README.md b/README.md
index 754c9d5..2aa614c 100644
--- a/README.md
+++ b/README.md
@@ -4,14 +4,14 @@
-
+
FinClip Flutter SDK
-
+
本项目提供在 Flutter 环境中运行小程序的能力
-
+
👉 https://www.finclip.com/ 👈
@@ -166,7 +166,7 @@ class _MyAppState extends State {
## 📋 接口文档
### 1. 初始化小程序
-
+
在使用 SDK 提供的 API 之前必须要初始化 SDK ,初始化 SDK 的接口如下
```
diff --git a/example/pubspec.lock b/example/pubspec.lock
index e9626a4..52f1eff 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -5,56 +5,56 @@ packages:
dependency: transitive
description:
name: async
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "2.6.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
fake_async:
dependency: transitive
description:
name: fake_async
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
flutter:
@@ -71,14 +71,14 @@ packages:
dependency: transitive
description:
name: matcher
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
mop:
@@ -92,7 +92,7 @@ packages:
dependency: transitive
description:
name: path
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
sky_engine:
@@ -104,58 +104,58 @@ packages:
dependency: transitive
description:
name: source_span
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
typed_data:
dependency: transitive
description:
name: typed_data
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
- url: "https://pub.flutter-io.cn"
+ url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
- flutter: ">=1.10.0"
+ flutter: ">=2.2.3"
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index bd40a2d..ce89754 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -3,7 +3,7 @@ description: Demonstrates how to use the mop plugin.
publish_to: 'none'
environment:
- sdk: '>=2.1.0 <3.0.0'
+ sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart
index 9808a6f..bf7d60e 100644
--- a/example/test/widget_test.dart
+++ b/example/test/widget_test.dart
@@ -19,7 +19,7 @@ void main() {
expect(
find.byWidgetPredicate(
(Widget widget) => widget is Text &&
- widget.data.startsWith('Running on:'),
+ widget.data!.startsWith('Running on:'),
),
findsOneWidget,
);
diff --git a/lib/mop.dart b/lib/mop.dart
index 855078e..aa99518 100644
--- a/lib/mop.dart
+++ b/lib/mop.dart
@@ -10,9 +10,9 @@ typedef ExtensionApiHandler = Future Function(dynamic params);
class Mop {
static final Mop _instance = new Mop._internal();
- MethodChannel _channel;
- EventChannel _mopEventChannel;
- int eventId = 0;
+ late MethodChannel _channel;
+ late EventChannel _mopEventChannel;
+ late int eventId = 0;
List