47 lines
2.0 KiB
Dart
Executable File
47 lines
2.0 KiB
Dart
Executable File
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:star_lock/app_settings/app_settings.dart';
|
|
import 'package:star_lock/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_entity.dart';
|
|
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
|
|
|
import '../../../tools/store_service.dart';
|
|
import '../../../translations/app_dept.dart';
|
|
import '../../../translations/current_locale_tool.dart';
|
|
|
|
class MineSetState {
|
|
final Rx<UserSettingInfoData> userInfoData = UserSettingInfoData().obs;
|
|
final Rx<UserSettings> userSetting = UserSettings().obs;
|
|
|
|
RxBool isPrompTone = false.obs; //提示音
|
|
RxBool isTouchUnlock = false.obs; //触摸开锁
|
|
RxBool isPushNotification = false.obs; //消息推送
|
|
RxBool isWechatPublicAccountPush = false.obs; //微信公众号推送
|
|
RxString qrCodeUrl = ''.obs; //二维码地址
|
|
RxString qrCodeText = ''.obs; //二维码提示语
|
|
|
|
RxInt lockScreen = 2.obs; //锁屏
|
|
RxInt hideExpiredAccessFlag = 2.obs; //隐藏无效开锁
|
|
RxString currentLanguage =
|
|
CurrentLocaleTool.getCurrentLocaleString().obs; // 当前选择语言
|
|
|
|
/// 获取翻译后的国家名称
|
|
String get currentLanguageName {
|
|
AppLog.log(
|
|
'currentLanguage.value:${currentLanguage.value} fsgdsgddfg:${CurrentLocaleTool.getCurrentLocaleWithLanguageCode(currentLanguage.value)}');
|
|
return StoreService.to.getLanguageCode()!.isEmpty
|
|
? '跟随系统'.tr
|
|
: ExtensionLanguageType.fromLocale(CurrentLocaleTool.convertLocale(
|
|
CurrentLocaleTool.getCurrentLocaleWithLanguageCode(
|
|
currentLanguage.value)))
|
|
.lanTitle;
|
|
}
|
|
|
|
RxBool isAmazonAlexa = false.obs; //亚马逊Alexa
|
|
RxBool isGoogleHome = false.obs; //谷歌Home
|
|
Rx<AmazonAlexa> amazonAlexaData = AmazonAlexa().obs;
|
|
Rx<GoogleHome> googleHomeData = GoogleHome().obs;
|
|
|
|
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
|
|
FlutterLocalNotificationsPlugin();
|
|
}
|