Commit 645a1324 authored by 汪林玲's avatar 汪林玲

更新

parent d3dbadcb
......@@ -6,7 +6,7 @@ description: Demonstrates how to use the umeng_common_sdk plugin.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.7.0 <3.0.0'
dependencies:
flutter:
......
......@@ -8,20 +8,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:umeng_common_sdk_example/main.dart';
void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that platform version is retrieved.
expect(
find.byWidgetPredicate(
(Widget widget) => widget is Text &&
widget.data!.startsWith('Running on:'),
),
findsOneWidget,
);
});
testWidgets('Verify Platform version', (WidgetTester tester) async {});
}
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
class UmengCommonSdk {
......@@ -12,8 +13,8 @@ class UmengCommonSdk {
/// [enableLog] 是否启用日志
///
static Future<bool> preInit({
required String appKey,
required String channel,
@required String appKey,
@required String channel,
bool enableLog = false,
}) async {
final bool result = await _channel.invokeMethod('preInit', {
......@@ -32,10 +33,10 @@ class UmengCommonSdk {
/// [pushSecret] 密钥
///
static Future<bool> init({
required String appKey,
required String channel,
@required String appKey,
@required String channel,
int deviceType = 1,
String? pushSecret,
String pushSecret,
}) async {
final dynamic result = await _channel.invokeMethod('init', {
'appKey': appKey,
......@@ -52,8 +53,8 @@ class UmengCommonSdk {
/// [properties] 事件参数
///
static Future<bool> onEvent({
required String event,
required Map<String, dynamic> properties,
@required String event,
@required Map<String, dynamic> properties,
}) async {
return await _channel.invokeMethod('onEvent', {
'eventId': event,
......
......@@ -4,7 +4,7 @@ version: 1.2.2
homepage: https://www.umeng.com
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.7.0 <3.0.0'
flutter: ">=1.10.0"
dependencies:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment