58 lines
2.0 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
2024-08-02 13:52:37 +08:00
class CatEyeCustomModeState { //实时画面 0发生事件事查看 1实时查看
CatEyeCustomModeState() {
Map map = Get.arguments;
if (map['lockSetInfoData'] != null) {
lockSetInfoData.value = map['lockSetInfoData'];
}
if (map['catEyeConfigData'] != null) {
catEyeConfigData.value = map['catEyeConfigData'];
}
}
RxBool isCheck = false.obs;
RxBool faceOn = false.obs; //面容开锁
RxBool autoBright = false.obs; //自动亮屏
// var showsUpVideo = '10${TranslationLoader.lanKeys!.second!.tr}'.obs; //有人出现时录像
// var detectionRange = '约1.5米'.obs; //人体侦测距离
2024-08-02 13:52:37 +08:00
RxList<String> showsUpVideoList = <String>[
'不录像'.tr,
'立即录像'.tr,
2024-08-02 13:52:37 +08:00
'5${"".tr}',
'10${"".tr}',
'15${"".tr}',
'30${"".tr}',
'60${"".tr}'
].obs;
RxList<String> detectionRangeList = <String>['约0.8米'.tr, '约1.5米'.tr, '约3.0米'.tr].obs;
//高亮样式
final TextStyle titleStyle = TextStyle(
color: Colors.black, fontSize: 24.sp, fontWeight: FontWeight.w500);
//默认样式
final TextStyle subTipsStyle =
TextStyle(color: AppColors.placeholderTextColor, fontSize: 22.sp);
2024-08-02 13:52:37 +08:00
late InlineSpan tipsPreviewSpan = TextSpan(children: <InlineSpan>[
TextSpan(
2024-08-02 13:52:37 +08:00
text: '${"添加和使用面容开锁时".tr}:\n',
style: titleStyle),
TextSpan(
2024-08-02 13:52:37 +08:00
text: '添加和使用面容开锁时提示'.tr,
style: subTipsStyle),
]);
2024-08-02 13:52:37 +08:00
Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
Rx<CatEyeConfig> catEyeConfigData = CatEyeConfig().obs;
2024-08-02 13:52:37 +08:00
RxString selectVideoSlot = ''.obs; //录像时段 0全天 1自定义时间
RxString recordTime = ''.obs; //有人出现时录像
RxString detectionDistance = ''.obs; //人体侦测距离
RxString realTimeMode = ''.obs;
}