From aa105bcb90a7142b3e9648c5bc1e92454685b908 Mon Sep 17 00:00:00 2001 From: weiqiangliu Date: Wed, 12 Apr 2023 16:38:04 +0800 Subject: [PATCH] Release 2.4.0 --- LICENSE | 2 +- example/test/widget_test.dart | 27 ----------------------- lib/sensors_analytics_flutter_plugin.dart | 14 ++++-------- 3 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 example/test/widget_test.dart diff --git a/LICENSE b/LICENSE index 518dd13..706d55f 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2015-2021 Sensors Data Inc. + Copyright 2015-2023 Sensors Data Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart deleted file mode 100644 index 96f9f24..0000000 --- a/example/test/widget_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// This is a basic Flutter widget test. -// -// 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 -// 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. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:sensorsanalyticsflutterplugin_example/main_another_entry.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, - ); - }); -} diff --git a/lib/sensors_analytics_flutter_plugin.dart b/lib/sensors_analytics_flutter_plugin.dart index e41b410..9f84f6b 100644 --- a/lib/sensors_analytics_flutter_plugin.dart +++ b/lib/sensors_analytics_flutter_plugin.dart @@ -81,7 +81,7 @@ class SensorsAnalyticsFlutterPlugin { Set? networkTypes, int flushInterval = 15000, int flushBulkSize = 100, - bool enableLog: false, + bool enableLog = false, bool javaScriptBridge = false, bool encrypt = false, AndroidConfig? android, @@ -320,9 +320,7 @@ class SensorsAnalyticsFlutterPlugin { /// SensorsAnalyticsFlutterPlugin.profileSet({'key1':'value1','key2':'value2'}); /// static void profileSet(Map profileProperties) { - if (profileProperties != null) { - profileProperties = {...profileProperties}; - } + profileProperties = {...profileProperties}; _convertDateTime(profileProperties); List params = [profileProperties]; _channel.invokeMethod('profileSet', params); @@ -338,9 +336,7 @@ class SensorsAnalyticsFlutterPlugin { /// SensorsAnalyticsFlutterPlugin.profileSetOnce({'key1':'value1','key2':'value2'}); /// static void profileSetOnce(Map profileProperties) { - if (profileProperties != null) { - profileProperties = {...profileProperties}; - } + profileProperties = {...profileProperties}; _convertDateTime(profileProperties); List params = [profileProperties]; _channel.invokeMethod('profileSetOnce', params); @@ -422,9 +418,7 @@ class SensorsAnalyticsFlutterPlugin { /// SensorsAnalyticsFlutterPlugin.registerSuperProperties({'key1':'value1','key2':'value2'}); /// static void registerSuperProperties(Map superProperties) { - if (superProperties != null) { - superProperties = {...superProperties}; - } + superProperties = {...superProperties}; _convertDateTime(superProperties); List params = [superProperties]; _channel.invokeMethod('registerSuperProperties', params);