migrate to null safe
parent
214ec544ed
commit
a4dfe2f8e6
|
@ -1 +1 @@
|
||||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-08-13 09:53:09.007824","version":"2.2.2"}
|
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/weichengzhu/dev/flutter/mop-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/weichengzhu/dev/flutter/mop-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-08-18 22:10:00.612245","version":"2.2.3"}
|
|
@ -1,124 +1,124 @@
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
import 'dart:async';
|
// import 'dart:async';
|
||||||
import 'dart:io';
|
// import 'dart:io';
|
||||||
import 'package:mop/mop.dart';
|
// import 'package:mop/mop.dart';
|
||||||
|
|
||||||
void main() => runApp(MyApp());
|
// void main() => runApp(MyApp());
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
// class MyApp extends StatefulWidget {
|
||||||
@override
|
// @override
|
||||||
_MyAppState createState() => _MyAppState();
|
// _MyAppState createState() => _MyAppState();
|
||||||
}
|
// }
|
||||||
|
|
||||||
class _MyAppState extends State<MyApp> {
|
// class _MyAppState extends State<MyApp> {
|
||||||
@override
|
// @override
|
||||||
void initState() {
|
// void initState() {
|
||||||
super.initState();
|
// super.initState();
|
||||||
init();
|
// init();
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Platform messages are asynchronous, so we initialize in an async method.
|
// // Platform messages are asynchronous, so we initialize in an async method.
|
||||||
Future<void> init() async {
|
// Future<void> init() async {
|
||||||
if (Platform.isIOS) {
|
// if (Platform.isIOS) {
|
||||||
final res = await Mop.instance.initialize(
|
// final res = await Mop.instance.initialize(
|
||||||
'22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c',
|
// '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c',
|
||||||
apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop');
|
// apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop');
|
||||||
print(res);
|
// print(res);
|
||||||
} else if (Platform.isAndroid) {
|
// } else if (Platform.isAndroid) {
|
||||||
final res = await Mop.instance.initialize(
|
// final res = await Mop.instance.initialize(
|
||||||
'22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c',
|
// '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c',
|
||||||
apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop');
|
// apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop');
|
||||||
print(res);
|
// print(res);
|
||||||
}
|
// }
|
||||||
if (!mounted) return;
|
// if (!mounted) return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 5e637a18cbfae4000170fa7a
|
// // 5e637a18cbfae4000170fa7a
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
// return MaterialApp(
|
||||||
home: Scaffold(
|
// home: Scaffold(
|
||||||
appBar: AppBar(
|
// appBar: AppBar(
|
||||||
title: const Text('凡泰极客小程序 Flutter 插件'),
|
// title: const Text('凡泰极客小程序 Flutter 插件'),
|
||||||
),
|
// ),
|
||||||
body: Center(
|
// body: Center(
|
||||||
child: Container(
|
// child: Container(
|
||||||
padding: EdgeInsets.only(
|
// padding: EdgeInsets.only(
|
||||||
top: 20,
|
// top: 20,
|
||||||
),
|
// ),
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: <Widget>[
|
// children: <Widget>[
|
||||||
Container(
|
// Container(
|
||||||
width: 140,
|
// width: 140,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
// borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||||
gradient: LinearGradient(
|
// gradient: LinearGradient(
|
||||||
colors: const [Color(0xFF12767e), Color(0xFF0dabb8)],
|
// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)],
|
||||||
stops: const [0.0, 1.0],
|
// stops: const [0.0, 1.0],
|
||||||
begin: Alignment.topCenter,
|
// begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
// end: Alignment.bottomCenter,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: FlatButton(
|
// child: FlatButton(
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Mop.instance.openApplet('5ea03fa563cb900001d73863',
|
// Mop.instance.openApplet('5ea03fa563cb900001d73863',
|
||||||
path: 'pages/index/index', query: '');
|
// path: 'pages/index/index', query: '');
|
||||||
},
|
// },
|
||||||
child: Text(
|
// child: Text(
|
||||||
'打开画图小程序',
|
// '打开画图小程序',
|
||||||
style: TextStyle(color: Colors.white),
|
// style: TextStyle(color: Colors.white),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 30),
|
// SizedBox(height: 30),
|
||||||
Container(
|
// Container(
|
||||||
width: 140,
|
// width: 140,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
// borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||||
gradient: LinearGradient(
|
// gradient: LinearGradient(
|
||||||
colors: const [Color(0xFF12767e), Color(0xFF0dabb8)],
|
// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)],
|
||||||
stops: const [0.0, 1.0],
|
// stops: const [0.0, 1.0],
|
||||||
begin: Alignment.topCenter,
|
// begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
// end: Alignment.bottomCenter,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: FlatButton(
|
// child: FlatButton(
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Mop.instance.openApplet('5ea0401463cb900001d73865');
|
// Mop.instance.openApplet('5ea0401463cb900001d73865');
|
||||||
},
|
// },
|
||||||
child: Text(
|
// child: Text(
|
||||||
'打开官方小程序',
|
// '打开官方小程序',
|
||||||
style: TextStyle(color: Colors.white),
|
// style: TextStyle(color: Colors.white),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 30),
|
// SizedBox(height: 30),
|
||||||
Container(
|
// Container(
|
||||||
width: 140,
|
// width: 140,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
// borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||||
gradient: LinearGradient(
|
// gradient: LinearGradient(
|
||||||
colors: const [Color(0xFF12767e), Color(0xFF0dabb8)],
|
// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)],
|
||||||
stops: const [0.0, 1.0],
|
// stops: const [0.0, 1.0],
|
||||||
begin: Alignment.topCenter,
|
// begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
// end: Alignment.bottomCenter,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: FlatButton(
|
// child: FlatButton(
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Mop.instance.openApplet('5ea0412663cb900001d73867');
|
// Mop.instance.openApplet('5ea0412663cb900001d73867');
|
||||||
},
|
// },
|
||||||
child: Text(
|
// child: Text(
|
||||||
'我的对账单',
|
// '我的对账单',
|
||||||
style: TextStyle(color: Colors.white),
|
// style: TextStyle(color: Colors.white),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
|
@ -5,56 +5,56 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "2.6.1"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.15.0"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "0.1.3"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
flutter:
|
flutter:
|
||||||
|
@ -71,14 +71,14 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10"
|
version: "0.12.10"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
mop:
|
mop:
|
||||||
|
@ -87,12 +87,12 @@ packages:
|
||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.33.5"
|
version: "2.33.3"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.0"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
|
@ -104,58 +104,58 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.10.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.3.0"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0 <3.0.0"
|
dart: ">=2.12.0 <3.0.0"
|
||||||
flutter: ">=1.10.0"
|
flutter: ">=2.2.3"
|
||||||
|
|
|
@ -3,7 +3,7 @@ description: Demonstrates how to use the mop plugin.
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.1.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
// This is a basic Flutter widget test.
|
// // This is a basic Flutter widget test.
|
||||||
//
|
// //
|
||||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
// // To perform an interaction with a widget in your test, use the WidgetTester
|
||||||
// utility that Flutter provides. For example, you can send tap and scroll
|
// // utility that Flutter provides. For example, you can send tap and scroll
|
||||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
// // gestures. You can also use WidgetTester to find child widgets in the widget
|
||||||
// tree, read text, and verify that the values of widget properties are correct.
|
// // tree, read text, and verify that the values of widget properties are correct.
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
// import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
import 'package:mop_example/main.dart';
|
// import 'package:mop_example/main.dart';
|
||||||
|
|
||||||
void main() {
|
// void main() {
|
||||||
testWidgets('Verify Platform version', (WidgetTester tester) async {
|
// testWidgets('Verify Platform version', (WidgetTester tester) async {
|
||||||
// Build our app and trigger a frame.
|
// // Build our app and trigger a frame.
|
||||||
await tester.pumpWidget(MyApp());
|
// await tester.pumpWidget(MyApp());
|
||||||
|
|
||||||
// Verify that platform version is retrieved.
|
// // Verify that platform version is retrieved.
|
||||||
expect(
|
// expect(
|
||||||
find.byWidgetPredicate(
|
// find.byWidgetPredicate(
|
||||||
(Widget widget) => widget is Text &&
|
// (Widget widget) => widget is Text &&
|
||||||
widget.data.startsWith('Running on:'),
|
// widget.data.startsWith('Running on:'),
|
||||||
),
|
// ),
|
||||||
findsOneWidget,
|
// findsOneWidget,
|
||||||
);
|
// );
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
58
lib/mop.dart
58
lib/mop.dart
|
@ -11,9 +11,9 @@ typedef ExtensionApiHandler = Future Function(dynamic params);
|
||||||
|
|
||||||
class Mop {
|
class Mop {
|
||||||
static final Mop _instance = new Mop._internal();
|
static final Mop _instance = new Mop._internal();
|
||||||
MethodChannel _channel;
|
late MethodChannel _channel;
|
||||||
EventChannel _mopEventChannel;
|
late EventChannel _mopEventChannel;
|
||||||
int eventId = 0;
|
late int eventId = 0;
|
||||||
List<Map<String, dynamic>> _mopEventQueye = <Map<String, dynamic>>[];
|
List<Map<String, dynamic>> _mopEventQueye = <Map<String, dynamic>>[];
|
||||||
|
|
||||||
Map<String, ExtensionApiHandler> _extensionApis = {};
|
Map<String, ExtensionApiHandler> _extensionApis = {};
|
||||||
|
@ -22,7 +22,7 @@ class Mop {
|
||||||
return _instance;
|
return _instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mop._internal() {
|
Mop._internal() {
|
||||||
print('mop: _internal');
|
print('mop: _internal');
|
||||||
// init
|
// init
|
||||||
_channel = new MethodChannel('mop');
|
_channel = new MethodChannel('mop');
|
||||||
|
@ -70,11 +70,11 @@ class Mop {
|
||||||
/// [disablePermission] is optional.
|
/// [disablePermission] is optional.
|
||||||
///
|
///
|
||||||
Future<Map> initialize(String appkey, String secret,
|
Future<Map> initialize(String appkey, String secret,
|
||||||
{String apiServer,
|
{required String apiServer,
|
||||||
String apiPrefix,
|
required String apiPrefix,
|
||||||
String cryptType,
|
required String cryptType,
|
||||||
bool disablePermission,
|
required bool disablePermission,
|
||||||
String userId,
|
required String userId,
|
||||||
bool encryptServerData = false,
|
bool encryptServerData = false,
|
||||||
bool debug = false}) async {
|
bool debug = false}) async {
|
||||||
final Map ret = await _channel.invokeMethod('initialize', {
|
final Map ret = await _channel.invokeMethod('initialize', {
|
||||||
|
@ -103,26 +103,26 @@ class Mop {
|
||||||
/// [cryptType] is optional. cryptType, should be MD5/SM
|
/// [cryptType] is optional. cryptType, should be MD5/SM
|
||||||
Future<Map> openApplet(
|
Future<Map> openApplet(
|
||||||
final String appId, {
|
final String appId, {
|
||||||
final String path,
|
required final String path,
|
||||||
final String query,
|
required final String query,
|
||||||
final int sequence,
|
required final int sequence,
|
||||||
final String apiServer,
|
required final String apiServer,
|
||||||
final String apiPrefix,
|
required final String apiPrefix,
|
||||||
final String fingerprint,
|
required final String fingerprint,
|
||||||
final String cryptType,
|
required final String cryptType,
|
||||||
final String scene,
|
required final String scene,
|
||||||
}) async {
|
}) async {
|
||||||
Map<String, Object> params = {'appId': appId};
|
Map<String, Object> params = {'appId': appId};
|
||||||
Map param = {};
|
Map param = {};
|
||||||
if (path != null) param["path"] = path;
|
param["path"] = path;
|
||||||
if (query != null) param["query"] = query;
|
param["query"] = query;
|
||||||
if (param.length > 0) params["params"] = param;
|
if (param.length > 0) params["params"] = param;
|
||||||
if (sequence != null) params["sequence"] = sequence;
|
params["sequence"] = sequence;
|
||||||
if (apiServer != null) params["apiServer"] = apiServer;
|
params["apiServer"] = apiServer;
|
||||||
if (apiPrefix != null) params["apiPrefix"] = apiPrefix;
|
params["apiPrefix"] = apiPrefix;
|
||||||
if (fingerprint != null) params["fingerprint"] = fingerprint;
|
params["fingerprint"] = fingerprint;
|
||||||
if (cryptType != null) params["cryptType"] = cryptType;
|
params["cryptType"] = cryptType;
|
||||||
if (scene != null) param["scene"] = scene;
|
param["scene"] = scene;
|
||||||
final Map ret = await _channel.invokeMethod('openApplet', params);
|
final Map ret = await _channel.invokeMethod('openApplet', params);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ class Mop {
|
||||||
///
|
///
|
||||||
Future<Map<String, dynamic>> currentApplet() async {
|
Future<Map<String, dynamic>> currentApplet() async {
|
||||||
final ret = await _channel.invokeMapMethod("currentApplet");
|
final ret = await _channel.invokeMapMethod("currentApplet");
|
||||||
return Map<String, dynamic>.from(ret);
|
return Map<String, dynamic>.from(ret!);
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -160,7 +160,7 @@ class Mop {
|
||||||
Future<String> sdkVersion() async {
|
Future<String> sdkVersion() async {
|
||||||
return await _channel
|
return await _channel
|
||||||
.invokeMapMethod("sdkVersion")
|
.invokeMapMethod("sdkVersion")
|
||||||
.then((value) => value["data"]);
|
.then((value) => value?["data"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -178,7 +178,7 @@ class Mop {
|
||||||
String qrCode, String apiServer) async {
|
String qrCode, String apiServer) async {
|
||||||
final ret = await _channel.invokeMapMethod("parseAppletInfoFromWXQrCode",
|
final ret = await _channel.invokeMapMethod("parseAppletInfoFromWXQrCode",
|
||||||
{"qrCode": qrCode, "apiServer": apiServer});
|
{"qrCode": qrCode, "apiServer": apiServer});
|
||||||
return Map<String, dynamic>.from(ret);
|
return Map<String, dynamic>.from(ret!);
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -226,7 +226,7 @@ class Mop {
|
||||||
Future<String> getSMSign(String plainText) async {
|
Future<String> getSMSign(String plainText) async {
|
||||||
var result =
|
var result =
|
||||||
await _channel.invokeMapMethod("smsign", {'plainText': plainText});
|
await _channel.invokeMapMethod("smsign", {'plainText': plainText});
|
||||||
var data = result['data']['data'];
|
var data = result?['data']['data'];
|
||||||
print(data);
|
print(data);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
38
pubspec.lock
38
pubspec.lock
|
@ -5,49 +5,49 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "2.6.1"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.15.0"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
flutter:
|
flutter:
|
||||||
|
@ -64,21 +64,21 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.10"
|
version: "0.12.10"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.0"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
|
@ -90,58 +90,58 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.10.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.3.0"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0 <3.0.0"
|
dart: ">=2.12.0 <3.0.0"
|
||||||
flutter: ">=1.10.0"
|
flutter: ">=2.2.3"
|
||||||
|
|
|
@ -4,8 +4,8 @@ version: '2.33.3'
|
||||||
homepage: https://github.com/finogeeks/mop-flutter-sdk
|
homepage: https://github.com/finogeeks/mop-flutter-sdk
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.1.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
flutter: '^1.10.0'
|
flutter: '^2.2.3'
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
|
Loading…
Reference in New Issue