26 lines
899 B
Dart
Raw Normal View History

2023-09-04 15:00:42 +08:00
import 'package:get/get.dart';
2023-09-07 18:36:16 +08:00
import '../../../lockMian/entity/lockInfoEntity.dart';
2023-09-04 15:00:42 +08:00
class AutomaticBlockingState {
2023-09-07 18:36:16 +08:00
var getKeyInfosData = KeyInfos().obs;
var isOpen = false.obs;// 是否开启自动落锁
var autoLockTime = "5".obs;
var isCustomLockTime = false.obs;// 自定义
AutomaticBlockingState() {
getKeyInfosData.value = Get.arguments as KeyInfos;
isOpen.value = getKeyInfosData.value.autoLockTime! > -1 ? true : false;
autoLockTime.value = getKeyInfosData.value.autoLockTime!.toString();
if((getKeyInfosData.value.autoLockTime! > 0)
&& (getKeyInfosData.value.autoLockTime! != 5)
&& (getKeyInfosData.value.autoLockTime! != 10)
&& (getKeyInfosData.value.autoLockTime! != 15)
&& (getKeyInfosData.value.autoLockTime! != 30)
&& (getKeyInfosData.value.autoLockTime! != 60)){
isCustomLockTime.value = true;
}
}
2023-09-04 15:00:42 +08:00
}