修复眠花糖设置闹钟无效

This commit is contained in:
wyf
2025-10-31 15:03:36 +08:00
parent 3c5db3bdf2
commit 58f4b1f0bb
18 changed files with 812 additions and 124 deletions

View File

@@ -12,6 +12,7 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart';
import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/enum/APPPackageType.dart';
import 'package:vbvs_app/model/WebSocketMessage.dart';
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
import 'package:vbvs_app/pages/common/selectDialog.dart';
@@ -126,27 +127,29 @@ class _HomePageState extends State<MainPageBBottomChange>
final getStorage = GetStorage();
@override
Widget build(BuildContext context) {
Future.delayed(const Duration(milliseconds: 0), () {
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
String btnName = "同意".tr;
String cancelName = "取消".tr;
if (Platform.isAndroid) {
cancelName = "退出".tr;
}
showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1),
btnName: btnName, showCancel: true, cancelName: cancelName)
.then((e) {
if (e == "confirm") {
getStorage.write("isShowYingShiDialog", "true");
} else {
if (cancelName == "退出") {
SystemNavigator.pop();
}
if (AppConstants().ent_type == APPPackageType.MHT.code) {
Future.delayed(const Duration(milliseconds: 0), () {
String? isShowYingShiDialog = getStorage.read("isShowYingShiDialog");
if (isShowYingShiDialog == null || isShowYingShiDialog != "true") {
String btnName = "同意".tr;
String cancelName = "取消".tr;
if (Platform.isAndroid) {
cancelName = "退出".tr;
}
});
}
});
showCustomConfirmOfWebViewDialog(context, "隐私协议".tr, getPrivacy(1),
btnName: btnName, showCancel: true, cancelName: cancelName)
.then((e) {
if (e == "confirm") {
getStorage.write("isShowYingShiDialog", "true");
} else {
if (cancelName == "退出") {
SystemNavigator.pop();
}
}
});
}
});
}
return Obx(() {
final currentLanguage =
languageController.selectLanguage.value; // 监听此变量变化