91 lines
4.0 KiB
Dart
Executable File
91 lines
4.0 KiB
Dart
Executable File
import 'dart:async';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart';
|
|
|
|
import '../../../blue/io_reply.dart';
|
|
import '../../lockMian/entity/lockListInfo_entity.dart';
|
|
|
|
class LockDetailState {
|
|
Rx<LockListInfoItemEntity> keyInfos = LockListInfoItemEntity().obs;
|
|
final Rx<LockSetInfoData> lockSetInfoData = LockSetInfoData().obs;
|
|
late StreamSubscription<Reply> replySubscription;
|
|
StreamSubscription?
|
|
lockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceEvent;
|
|
StreamSubscription? LockSetChangeSetRefreshLockDetailWithTypeSubscription;
|
|
StreamSubscription? DetailLockInfo;
|
|
StreamSubscription? SuccessfulDistributionNetworkEvent;
|
|
|
|
String lockNetToken = '0';
|
|
int differentialTime = 0; // 服务器时间与本地时间差值
|
|
bool isHaveNetwork = true;
|
|
int lockUserNo = 0;
|
|
int senderUserId = 0;
|
|
bool isOnlyOneData = false;
|
|
|
|
RxInt isAttendance = 0.obs; // 是否开启考勤
|
|
RxInt isOpenLockNeedOnline = 0.obs; // APP开锁时是否需联网
|
|
RxInt electricQuantity = 0.obs; // 电量
|
|
RxInt electricQuantityStandby = 0.obs; // 备用电池电量
|
|
RxInt isOpenPassageMode = 0.obs; // 是否开启了常开模式
|
|
RxString lockAlias = ''.obs; // 锁名字
|
|
|
|
// var currentDeviceUUid = "".obs; // 当前设备的uuid
|
|
|
|
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
|
RxBool iSClosedUnlockSuccessfulPopup = false.obs; // 是否关闭了开锁成功弹窗
|
|
RxBool iSOpenLock = true.obs; // 是开锁还是关锁
|
|
Timer? closedUnlockSuccessfulTimer;
|
|
|
|
RxBool bottomBtnisEable = true.obs; // 是否不可用 用于限制底部按钮是否可用
|
|
RxBool openDoorBtnisUneable = true.obs; // 当钥匙状态不能使用的情况下开锁按钮禁止使用,默认可用
|
|
|
|
int openDoorModel = 0; // 离线开门0, 在线开门2 离线关门32 在线关门34
|
|
|
|
//过渡动画控制器
|
|
AnimationController? animationController;
|
|
// var lockState = 0.obs;// 0未连接普通状态 1连接开锁中(展示动画) 2已连接开锁成功 3检测可用性 4连接失败 5连接失败重连中
|
|
RxInt openLockBtnState = 0.obs; // 0普通状态(未转动) 1连接中(转动状态)
|
|
// var connectState = 0.obs;// 0未连接 1连接
|
|
|
|
final PageController pageController = PageController();
|
|
RxInt currentPage = 0.obs;
|
|
|
|
int operateDate = 0; // 按日期查询消息记录的时间戳
|
|
int currentDate = 0; // 当前服务器UTC毫秒时间戳
|
|
|
|
int logCountPage = 10; // 蓝牙记录一页多少个
|
|
RxInt nextAuthTime = 0.obs; // 下次认证时间
|
|
|
|
int countReq = 10;// 每次请求的数量
|
|
RxInt indexCount = 0.obs;// 用来显示按钮的索引 0/5
|
|
|
|
int uploadPasswordPage = 0;// 上传密码的页数
|
|
List<int> uploadPasswordDataList = <int>[];// 上传密码的数据
|
|
|
|
int uploadCardPage = 0;// 上传卡片的页数
|
|
List<int> uploadCardDataList = <int>[];// 上传卡片的数据
|
|
|
|
int uploadFingerprintPage = 0;// 上传指纹的页数
|
|
List<int> uploadFingerprintDataList = <int>[];// 上传指纹的数据
|
|
|
|
int uploadFacePage = 0;// 上传人脸的页数
|
|
List<int> uploadFaceDataList = <int>[];// 上传人脸的数据
|
|
|
|
int uploadPalmVeinPage = 0;// 上传掌静脉的页数
|
|
List<int> uploadPalmVeinDataList = <int>[];// 上传掌静脉的数据
|
|
|
|
int uploadRemoteControlPage = 0;// 上传遥控的页数
|
|
List<int> uploadRemoteControlDataList = <int>[];// 上传遥控的数据
|
|
|
|
List<int> uploadLockSetDataList = <int>[];// 上传锁设置数据
|
|
|
|
// 远程开锁请求(推送消息触发)
|
|
RxBool showPushRemoteUnlockRequest = false.obs; // 是否显示推送远程开锁确认界面
|
|
RxInt pushRemoteUnlockCountdownSeconds = 60.obs; // 推送远程开锁倒计时秒数
|
|
Timer? pushRemoteUnlockRequestTimer; // 推送远程开锁倒计时定时器
|
|
int currentPushOperateDate = 0; // 当前推送请求操作时间戳
|
|
int handledPushOperateDate = 0; // 已处理的推送请求操作时间戳,避免重复显示
|
|
}
|