Browse Source

[modify]替换androidId获取库并完善待办

zk 1 year ago
parent
commit
05ea923f93

+ 6 - 1
lib/data/bean/agenda.dart

@@ -50,7 +50,12 @@ class Agenda {
     final agenda = _$AgendaFromJson(json);
     final agenda = _$AgendaFromJson(json);
     agenda.todo.value =
     agenda.todo.value =
         json.containsKey('todo') ? json['todo'] as bool? ?? false : false;
         json.containsKey('todo') ? json['todo'] as bool? ?? false : false;
-    agenda.agendaStatus = Rxn(AgendaStatus.todo);
+    bool? finish = json['finish'] as bool?;
+    if (finish == true) {
+      agenda.agendaStatus = Rxn(AgendaStatus.done);
+    } else if (finish == false) {
+      agenda.agendaStatus = Rxn(AgendaStatus.todo);
+    }
     agenda._content.value = json['content'] as String? ?? '';
     agenda._content.value = json['content'] as String? ?? '';
     return agenda;
     return agenda;
   }
   }

+ 3 - 3
lib/device/device_info_util.dart

@@ -6,14 +6,14 @@ import '../utils/common_utils.dart';
 class DeviceInfoUtil {
 class DeviceInfoUtil {
   DeviceInfoUtil._();
   DeviceInfoUtil._();
 
 
-  final String privacyPolicyKey = stringToUnicode('privacyPolicyKey');
+  // final String privacyPolicyKey = stringToUnicode('privacyPolicyKey');
 
 
   init() async {
   init() async {
     // if (!KVUtil.getBool(privacyPolicyKey, false)) {
     // if (!KVUtil.getBool(privacyPolicyKey, false)) {
     //   return;
     //   return;
     // }
     // }
-    await PlatformAndroidInfo().init();
-    await PlatformIosInfo().init();
+    await PlatformAndroidInfo.init();
+    await PlatformIosInfo.init();
   }
   }
 }
 }
 
 

+ 4 - 3
lib/device/platform_android_info.dart

@@ -2,14 +2,15 @@ import 'dart:io';
 
 
 import 'package:device_info_plus/device_info_plus.dart';
 import 'package:device_info_plus/device_info_plus.dart';
 import 'package:electronic_assistant/device/atmob_platform_info.dart';
 import 'package:electronic_assistant/device/atmob_platform_info.dart';
-import 'package:custom_platform_device_id/platform_device_id.dart';
+import 'package:android_id/android_id.dart';
+import 'package:flutter/widgets.dart';
 
 
 class PlatformAndroidInfo {
 class PlatformAndroidInfo {
-  init() async {
+  static init() async {
     if (Platform.isAndroid) {
     if (Platform.isAndroid) {
       DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
       DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
       AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
       AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
-      String? deviceId = await PlatformDeviceId.getDeviceId;
+      String? deviceId = await const AndroidId().getId();
       atmobPlatformInfo
       atmobPlatformInfo
           .setAndroidId(deviceId)
           .setAndroidId(deviceId)
           .setBrand(androidInfo.brand)
           .setBrand(androidInfo.brand)

+ 1 - 1
lib/device/platform_ios_info.dart

@@ -5,7 +5,7 @@ import 'package:device_info_plus/device_info_plus.dart';
 import 'atmob_platform_info.dart';
 import 'atmob_platform_info.dart';
 
 
 class PlatformIosInfo {
 class PlatformIosInfo {
-  init() async {
+  static init() async {
     if (Platform.isIOS) {
     if (Platform.isIOS) {
       DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
       DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
       IosDeviceInfo iosInfo = await deviceInfoPlugin.iosInfo;
       IosDeviceInfo iosInfo = await deviceInfoPlugin.iosInfo;

+ 4 - 2
lib/module/record/record_task.dart

@@ -2,8 +2,9 @@ import 'package:flutter_foreground_task/flutter_foreground_task.dart';
 
 
 class RecordTaskHandler extends TaskHandler {
 class RecordTaskHandler extends TaskHandler {
   @override
   @override
-  void onDestroy(DateTime timestamp) {
+  Future<void> onDestroy(DateTime timestamp) {
     // TODO: implement onDestroy
     // TODO: implement onDestroy
+    throw UnimplementedError();
   }
   }
 
 
   @override
   @override
@@ -12,8 +13,9 @@ class RecordTaskHandler extends TaskHandler {
   }
   }
 
 
   @override
   @override
-  void onStart(DateTime timestamp) {
+  Future<void> onStart(DateTime timestamp, TaskStarter starter) {
     // TODO: implement onStart
     // TODO: implement onStart
+    throw UnimplementedError();
   }
   }
 }
 }
 
 

+ 78 - 65
pubspec.lock

@@ -14,6 +14,22 @@ packages:
     description: dart
     description: dart
     source: sdk
     source: sdk
     version: "0.3.2"
     version: "0.3.2"
+  alipay_kit:
+    dependency: "direct main"
+    description:
+      name: alipay_kit
+      sha256: "6d6086b4cda1e0cd9b29b6dfe8d0ce88b9efc1c9f2c8d6fb39ac24c4e0f79b06"
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.0.0"
+  alipay_kit_android:
+    dependency: transitive
+    description:
+      name: alipay_kit_android
+      sha256: "402917c30e5a1c1bb36cab7c99e355f65a98da96c2666657805a985b00937f6f"
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.0.0"
   analyzer:
   analyzer:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -22,6 +38,14 @@ packages:
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
     version: "6.7.0"
     version: "6.7.0"
+  android_id:
+    dependency: "direct main"
+    description:
+      name: android_id
+      sha256: "748ba5f93dd5c497e675d8eaa1404346ce4d1794464ea654576ff192d153b92a"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.4.0"
   archive:
   archive:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -270,14 +294,6 @@ packages:
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
     version: "1.0.8"
     version: "1.0.8"
-  custom_platform_device_id:
-    dependency: "direct main"
-    description:
-      name: custom_platform_device_id
-      sha256: "4ea447c43daaa0ecad690950c90777a28654088305ec8752658807d3d2a5753f"
-      url: "https://pub.dev"
-    source: hosted
-    version: "1.0.8"
   dart_style:
   dart_style:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -302,22 +318,6 @@ packages:
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
     version: "0.7.10"
     version: "0.7.10"
-  device_info:
-    dependency: transitive
-    description:
-      name: device_info
-      sha256: f4a8156cb7b7480d969cb734907d18b333c8f0bc0b1ad0b342cdcecf30d62c48
-      url: "https://pub.dev"
-    source: hosted
-    version: "2.0.3"
-  device_info_platform_interface:
-    dependency: transitive
-    description:
-      name: device_info_platform_interface
-      sha256: b148e0bf9640145d09a4f8dea96614076f889e7f7f8b5ecab1c7e5c2dbc73c1b
-      url: "https://pub.dev"
-    source: hosted
-    version: "2.0.1"
   device_info_plus:
   device_info_plus:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -407,10 +407,10 @@ packages:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: flutter_foreground_task
       name: flutter_foreground_task
-      sha256: "6e0b5de3d1cceb3bd608793af0dde3346194465f9f664fdb8bd87638dbe847e9"
+      sha256: "2dc789446398606e7977acda63eaa05f347c175f0d19200d3dbf2b3383532ed4"
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "8.8.1+1"
+    version: "8.10.0"
   flutter_gen_core:
   flutter_gen_core:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -443,6 +443,11 @@ packages:
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
     version: "3.0.2"
     version: "3.0.2"
+  flutter_localizations:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
   flutter_plugin_android_lifecycle:
   flutter_plugin_android_lifecycle:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -644,6 +649,14 @@ packages:
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
     version: "2.1.3"
     version: "2.1.3"
+  intl:
+    dependency: transitive
+    description:
+      name: intl
+      sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.19.0"
   io:
   io:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -696,10 +709,10 @@ packages:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: just_audio_web
       name: just_audio_web
-      sha256: b163878529d9b028c53a6972fcd58cae2405bcd11cbfcea620b6fb9f151429d6
+      sha256: "9a98035b8b24b40749507687520ec5ab404e291d2b0937823ff45d92cb18d448"
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "0.4.12"
+    version: "0.4.13"
   leak_tracker:
   leak_tracker:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -948,62 +961,54 @@ packages:
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
     version: "2.3.0"
     version: "2.3.0"
-  petitparser:
-    dependency: transitive
-    description:
-      name: petitparser
-      sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
-      url: "https://pub.dev"
-    source: hosted
-    version: "6.0.2"
-  platform:
-    dependency: transitive
+  pay:
+    dependency: "direct main"
     description:
     description:
-      name: platform
-      sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
+      name: pay
+      sha256: ad904db0e06848cade6990a3ce1e10e921ae48f7ee06447873e07b9688ac1fc5
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "3.1.5"
-  platform_device_id_linux:
+    version: "2.0.0"
+  pay_android:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: platform_device_id_linux
-      sha256: "994b1608593e527a629af2d5aeb241c60d308d3434bc78b0f6fcb3c1a02dff43"
+      name: pay_android
+      sha256: aa46cd0ece1807d3fa293113fdb84afb5fc4b6ed60cf09a4886b753acb300859
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "1.0.0"
-  platform_device_id_macos:
+    version: "2.0.0"
+  pay_ios:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: platform_device_id_macos
-      sha256: "968db2a504c611294b12a031b3734432d6df10553a0d3ae3b33ed21abfdbaba0"
+      name: pay_ios
+      sha256: "75ccb285d03f22b136c58ab8e8e0c4b614ee52a8b67e6ccfb680d4d8c04a70f6"
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "1.0.0"
-  platform_device_id_platform_interface:
+    version: "1.0.11"
+  pay_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: platform_device_id_platform_interface
-      sha256: c61607594252aaddacf3e4c4371ab08f2ef85ff427817fa6e48a169429610c46
+      name: pay_platform_interface
+      sha256: "26a379e33c46508987c7afee8cde6f4aca5b5ab0afc697c27efbd33a9c2ea82a"
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "1.0.0"
-  platform_device_id_web:
+    version: "1.0.4"
+  petitparser:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: platform_device_id_web
-      sha256: "58e124594e1165db7f108395a780b1d1e1cd403021978e5228cf4289fbe736d5"
+      name: petitparser
+      sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "1.0.0"
-  platform_device_id_windows:
+    version: "6.0.2"
+  platform:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: platform_device_id_windows
-      sha256: dbf8dcf03ad8555320ebae2403a3081b79f137f37661874e161fe2de0a84eeeb
+      name: platform
+      sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "1.0.0"
+    version: "3.1.5"
   plugin_platform_interface:
   plugin_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1389,10 +1394,10 @@ packages:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: url_launcher_macos
       name: url_launcher_macos
-      sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de"
+      sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672"
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "3.2.0"
+    version: "3.2.1"
   url_launcher_platform_interface:
   url_launcher_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1533,10 +1538,10 @@ packages:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: web
       name: web
-      sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
+      sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
-    version: "1.0.0"
+    version: "1.1.0"
   web_socket:
   web_socket:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1585,6 +1590,14 @@ packages:
       url: "https://pub.dev"
       url: "https://pub.dev"
     source: hosted
     source: hosted
     version: "3.15.0"
     version: "3.15.0"
+  wechat_kit:
+    dependency: "direct main"
+    description:
+      name: wechat_kit
+      sha256: "4608b8f40af0201a324a2d8078c300c3dee85d550dfcb5bdf6811a0949008226"
+      url: "https://pub.dev"
+    source: hosted
+    version: "6.0.1"
   win32:
   win32:
     dependency: transitive
     dependency: transitive
     description:
     description:

+ 8 - 1
pubspec.yaml

@@ -85,7 +85,7 @@ dependencies:
 
 
   #获取设备信息
   #获取设备信息
   device_info_plus: ^10.1.2
   device_info_plus: ^10.1.2
-  custom_platform_device_id: ^1.0.8
+  android_id: ^0.4.0
 
 
   #文件选择
   #文件选择
   file_picker: ^8.1.2
   file_picker: ^8.1.2
@@ -94,6 +94,13 @@ dependencies:
   gravity_engine:
   gravity_engine:
     path: plugin/gravity_engine
     path: plugin/gravity_engine
 
 
+
+  #支付
+  alipay_kit: ^6.0.0
+  wechat_kit: ^6.0.1
+  pay: ^2.0.0
+
+
 dev_dependencies:
 dev_dependencies:
   flutter_test:
   flutter_test:
     sdk: flutter
     sdk: flutter