40 lines
1.1 KiB
Dart
Executable File
40 lines
1.1 KiB
Dart
Executable File
|
||
// 实现一个CommonDataManage的单例,用来管理项目中使用的一些公共数据
|
||
import 'package:get/get.dart';
|
||
|
||
import '../main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
|
||
import '../main/lockMian/entity/lockListInfo_entity.dart';
|
||
|
||
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;
|
||
|
||
// 锁信息
|
||
LockListInfoItemEntity currentKeyInfo = LockListInfoItemEntity();
|
||
|
||
// 当前锁的用户编号
|
||
int currentLockUserNo = 0;
|
||
// set setCurrentLockUserNo(int v) => _currentLockUserNo = v;
|
||
// get getCurrentLockUserNo => _currentLockUserNo;
|
||
|
||
LockSetInfoData currentLockSetInfoData = LockSetInfoData();
|
||
|
||
int dayLatestTime = (86400-1)*1000;
|
||
}
|
||
|
||
|