瀏覽代碼

[new]优化oaid导致的问题

zk 7 月之前
父節點
當前提交
d0c63ef232
共有 2 個文件被更改,包括 11 次插入5 次删除
  1. 6 2
      lib/device/platform_android_info.dart
  2. 5 3
      pubspec.lock

+ 6 - 2
lib/device/platform_android_info.dart

@@ -2,6 +2,7 @@ import 'dart:io';
 
 import 'package:device_info_plus/device_info_plus.dart';
 import 'package:android_id/android_id.dart';
+import 'package:location/utils/atmob_log.dart';
 
 import 'package:oaid/oaid_kit.dart';
 import 'atmob_platform_info.dart';
@@ -17,8 +18,11 @@ class PlatformAndroidInfo {
           .setBrand(androidInfo.brand)
           .setModel(androidInfo.model);
 
-      String? oaid = await Oaid.getOaid();
-      atmobPlatformInfo.setOaid(oaid);
+      Oaid.getOaid().then((oaid) {
+        atmobPlatformInfo.setOaid(oaid);
+      }).catchError((error) {
+        AtmobLog.d('oaid', error.toString());
+      });
     }
   }
 }

+ 5 - 3
pubspec.lock

@@ -762,9 +762,11 @@ packages:
   oaid:
     dependency: "direct main"
     description:
-      path: "D:\\Flutter\\Plugin\\oaid"
-      relative: false
-    source: path
+      path: "."
+      ref: "v0.0.2"
+      resolved-ref: b3ccf1965bf0e2336452db1b144f1a9e5434a012
+      url: "http://git.atmob.com:28999/Atmob-Flutter/Oaid.git"
+    source: git
     version: "0.0.1"
   package_config:
     dependency: transitive