2024-04-19 18:13:34 +08:00
|
|
|
|
|
|
|
|
|
|
// 实现一个CommonDataManage的单例,用来管理项目中使用的一些公共数据
|
|
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
|
|
2024-04-23 15:15:56 +08:00
|
|
|
|
import '../main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
|
|
|
|
|
|
import '../main/lockMian/entity/lockListInfo_entity.dart';
|
|
|
|
|
|
|
2024-04-19 18:13:34 +08:00
|
|
|
|
class CommonDataManage {
|
|
|
|
|
|
static CommonDataManage? _manager;
|
|
|
|
|
|
CommonDataManage._init();
|
|
|
|
|
|
|
|
|
|
|
|
static CommonDataManage? shareManager() {
|
|
|
|
|
|
_manager ??= CommonDataManage._init();
|
|
|
|
|
|
// _manager!._initBlue();
|
|
|
|
|
|
return _manager;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
factory CommonDataManage() => shareManager()!;
|
|
|
|
|
|
CommonDataManage? get manager => shareManager();
|
|
|
|
|
|
|
|
|
|
|
|
// 首页列表锁长度
|
|
|
|
|
|
final _mainLockCount = 0.obs;
|
|
|
|
|
|
set setMainLockCount(int v) => _mainLockCount.value = v;
|
|
|
|
|
|
get getMainLockCount => _mainLockCount;
|
|
|
|
|
|
|
2024-04-23 15:15:56 +08:00
|
|
|
|
// 锁信息
|
|
|
|
|
|
LockListInfoItemEntity currentKeyInfo = LockListInfoItemEntity();
|
|
|
|
|
|
|
2024-04-19 18:13:34 +08:00
|
|
|
|
// 当前锁的用户编号
|
|
|
|
|
|
int currentLockUserNo = 0;
|
|
|
|
|
|
// set setCurrentLockUserNo(int v) => _currentLockUserNo = v;
|
|
|
|
|
|
// get getCurrentLockUserNo => _currentLockUserNo;
|
|
|
|
|
|
|
2024-04-23 15:15:56 +08:00
|
|
|
|
LockSetInfoData currentLockSetInfoData = LockSetInfoData();
|
2024-05-14 15:11:14 +08:00
|
|
|
|
|
|
|
|
|
|
int dayLatestTime = (86400-1)*1000;
|
2024-04-19 18:13:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|