app-starlock/lib/mine/addLock/addLock/addLock_state.dart

30 lines
1.1 KiB
Dart
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:get/get.dart';
class AddLockState { //不同类型锁图片更换
AddLockState() {
final Map? map = Get.arguments;
if (map is Map && map.isNotEmpty) {
if (map['getLockType'] != null) {
getLockType.value = map['getLockType'];
//保险箱锁
if (getLockType.value == 4) {
lockTypeImg.value = 'images/lockType/addLock_safeBg.png';
} else if (getLockType.value == 5) {
//车位锁
lockTypeImg.value = 'images/lockType/addLock_parkingBg.png';
} else if (getLockType.value == 6) {
//智能门禁
lockTypeImg.value = 'images/lockType/addLock_entranceGuardBg.png';
}
} else {
lockTypeImg.value = 'images/lockType/addLock_touchScreen.png';
}
} else {
lockTypeImg.value = 'images/lockType/addLock_touchScreen.png';
}
}
RxInt getLockType = 1.obs; //0-所有锁1-门锁2-NFC无源锁3-挂锁4-保险箱锁5-车位锁6-智能门禁7-网关
RxString lockTypeImg = 'images/lockType/addLock_touchScreen.png'.obs;
}