app-starlock/lib/tools/commonDataManage.dart

46 lines
1.3 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.

// 实现一个CommonDataManage的单例用来管理项目中使用的一些公共数据
import 'package:get/get.dart';
import '../main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
import '../main/lockMian/entity/lockListInfo_entity.dart';
class CommonDataManage {
factory CommonDataManage() => shareManager()!;
CommonDataManage._init();
static CommonDataManage? _manager;
static CommonDataManage? shareManager() {
_manager ??= CommonDataManage._init();
// _manager!._initBlue();
return _manager;
}
CommonDataManage? get manager => shareManager();
// 首页列表锁长度
final RxInt _mainLockCount = 0.obs;
set setMainLockCount(int v) => _mainLockCount.value = v;
get getMainLockCount => _mainLockCount;
// 锁信息
LockListInfoItemEntity currentKeyInfo = LockListInfoItemEntity();
// 当前锁的用户编号
int currentLockUserNo = 0;
// set setCurrentLockUserNo(int v) => _currentLockUserNo = v;
// get getCurrentLockUserNo => _currentLockUserNo;
// 当前锁是否被转移 1-转移 0-未转移
int initUserNo = 0;
LockSetInfoData currentLockSetInfoData = LockSetInfoData();
int dayLatestTime = (86400-1)*1000;
// 选择的锁类型 0-所有锁1-门锁2-NFC无源锁3-挂锁4-保险箱锁5-车位锁6-智能门禁7-网关 8-智能门锁
int seletLockType = 0;
}