app-starlock/lib/tools/commonDataManage.dart
2024-05-18 09:37:50 +08:00

40 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.

// 实现一个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;
}