2024-03-14 10:04:33 +08:00
|
|
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
2023-09-26 11:47:36 +08:00
|
|
|
import 'package:get/get.dart';
|
2024-12-24 14:11:54 +08:00
|
|
|
import 'package:star_lock/app_settings/app_settings.dart';
|
2024-09-23 18:20:18 +08:00
|
|
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
2023-09-26 11:47:36 +08:00
|
|
|
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
|
|
|
|
|
2024-12-24 14:11:54 +08:00
|
|
|
import '../../../tools/store_service.dart';
|
2024-12-19 14:30:08 +08:00
|
|
|
import '../../../translations/app_dept.dart';
|
|
|
|
|
import '../../../translations/current_locale_tool.dart';
|
|
|
|
|
|
2023-09-26 11:47:36 +08:00
|
|
|
class MineSetState {
|
2024-08-21 14:12:15 +08:00
|
|
|
final Rx<UserSettingInfoData> userInfoData = UserSettingInfoData().obs;
|
|
|
|
|
final Rx<UserSettings> userSetting = UserSettings().obs;
|
2023-09-26 11:47:36 +08:00
|
|
|
|
2024-08-21 14:12:15 +08:00
|
|
|
RxBool isPrompTone = false.obs; //提示音
|
|
|
|
|
RxBool isTouchUnlock = false.obs; //触摸开锁
|
|
|
|
|
RxBool isPushNotification = false.obs; //消息推送
|
|
|
|
|
RxBool isWechatPublicAccountPush = false.obs; //微信公众号推送
|
|
|
|
|
RxString qrCodeUrl = ''.obs; //二维码地址
|
|
|
|
|
RxString qrCodeText = ''.obs; //二维码提示语
|
2023-09-26 11:47:36 +08:00
|
|
|
|
2024-12-13 10:59:42 +08:00
|
|
|
RxInt lockScreen = 2.obs; //锁屏
|
|
|
|
|
RxInt hideExpiredAccessFlag = 2.obs; //隐藏无效开锁
|
2024-12-19 14:30:08 +08:00
|
|
|
RxString currentLanguage =
|
|
|
|
|
CurrentLocaleTool.getCurrentLocaleString().obs; // 当前选择语言
|
|
|
|
|
|
|
|
|
|
/// 获取翻译后的国家名称
|
|
|
|
|
String get currentLanguageName {
|
2025-02-12 14:24:23 +08:00
|
|
|
// AppLog.log('currentLanguage.value:${currentLanguage.value} fsgdsgddfg:${CurrentLocaleTool.getCurrentLocaleWithLanguageCode(currentLanguage.value)}');
|
2024-12-24 14:11:54 +08:00
|
|
|
return StoreService.to.getLanguageCode()!.isEmpty
|
|
|
|
|
? '跟随系统'.tr
|
|
|
|
|
: ExtensionLanguageType.fromLocale(CurrentLocaleTool.convertLocale(
|
|
|
|
|
CurrentLocaleTool.getCurrentLocaleWithLanguageCode(
|
|
|
|
|
currentLanguage.value)))
|
|
|
|
|
.lanTitle;
|
2024-12-19 14:30:08 +08:00
|
|
|
}
|
|
|
|
|
|
2025-03-11 15:26:28 +08:00
|
|
|
String get currentLanguageCode {
|
|
|
|
|
return currentLanguage.value;
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-11 10:43:59 +08:00
|
|
|
RxBool isAmazonAlexa = false.obs; //亚马逊Alexa
|
|
|
|
|
RxBool isGoogleHome = false.obs; //谷歌Home
|
2024-09-23 18:20:18 +08:00
|
|
|
Rx<AmazonAlexa> amazonAlexaData = AmazonAlexa().obs;
|
|
|
|
|
Rx<GoogleHome> googleHomeData = GoogleHome().obs;
|
2023-10-25 16:18:27 +08:00
|
|
|
|
2024-03-14 10:04:33 +08:00
|
|
|
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
|
|
|
|
|
FlutterLocalNotificationsPlugin();
|
2023-09-26 11:47:36 +08:00
|
|
|
}
|