feat: enhance device ID generation with timeout and refactor shared_preferences dependency for OHOS compatibility

This commit is contained in:
Guangfei.Zhao
2026-09-03 16:39:53 +08:00
parent 3a7f744560
commit 72f6a30aff
6 changed files with 336 additions and 12 deletions
+9 -1
View File
@@ -19,7 +19,15 @@ dependencies:
flutter:
sdk: flutter
flutter_riverpod: 3.2.1
shared_preferences: ^2.5.5
# Pub.dev 的 shared_preferences 不声明 OHOS 实现,Flutter 因而不会把它
# 注册进 GeneratedPluginRegistrant.ets。固定到 CPF-Flutter 的 OHOS 适配
# 分支;该主包会解析 shared_preferences_ohos。
shared_preferences:
git:
url: https://gitcode.com/CPF-Flutter/flutter_packages.git
# 固定 commit,避免 Pub 在 Windows Git cache 中错误复用 master 工作树。
ref: 19bd50ff6d5eaa96f18c63796c51e1b4e78a7480
path: packages/shared_preferences/shared_preferences
dev_dependencies:
flutter_lints: ^6.0.0