fix: umeng初始化隐私合规问题修复

This commit is contained in:
Liuyf 2025-01-07 20:03:47 +08:00
parent 64d1cd902b
commit bb1cab3b00

View File

@ -23,9 +23,12 @@ class AppFirstEnterHandle {
switch (flagStr) {
case isAgreePrivacy: //
if (getFlag != isAgreePrivacy) {
await showPrivacyAgreementAlert();
final bool? isAgree = await showPrivacyAgreementAlert();
if (isAgree ?? false) {
await privacySDKInitialization();
}
}
await privacySDKInitialization();
if (Get.isRegistered<StarLockLoginLogic>()) {
Get.find<StarLockLoginLogic>().flushedDeviceInfo();
}
@ -51,8 +54,8 @@ class AppFirstEnterHandle {
}
//
Future<void> showPrivacyAgreementAlert() async {
await showCupertinoDialog(
Future<bool?> showPrivacyAgreementAlert() async {
return await showCupertinoDialog(
context: Get.context!,
builder: (BuildContext context) {
return PopScope(
@ -124,7 +127,7 @@ class AppFirstEnterHandle {
),
onPressed: () {
Storage.setString(isAgreePrivacy, isAgreePrivacy);
Navigator.of(context).pop();
Navigator.of(context).pop(true);
getAppFirstEnter(isShowUpdateVersion);
},
),
@ -195,7 +198,7 @@ class AppFirstEnterHandle {
),
onPressed: () {
Storage.setString(isAgreePrivacy, isAgreePrivacy);
Navigator.of(context).pop();
Navigator.of(context).pop(true);
getAppFirstEnter(isShowUpdateVersion);
},
),