26 lines
899 B
Dart
26 lines
899 B
Dart
|
|
import 'package:get/get.dart';
|
|
|
|
import '../../../lockMian/entity/lockInfoEntity.dart';
|
|
|
|
class AutomaticBlockingState {
|
|
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;
|
|
}
|
|
}
|
|
} |