feat:解决多次开门后,动画会一直不停的旋转

This commit is contained in:
anfe 2024-05-21 16:09:54 +08:00
parent 4c68c60f1d
commit 408f2e46b7
3 changed files with 9 additions and 11 deletions

View File

@ -34,12 +34,12 @@ abstract class SenderProtocol extends IOData {
} }
void printLog(List<int> data) { void printLog(List<int> data) {
// AppLog.log( AppLog.log(
// "App -> 锁,指令类型:${commandType!.typeName} ${commandType!.typeValue == 0x3030 "App -> 锁,指令类型:${commandType!.typeName} ${commandType!.typeValue == 0x3030
// ? '子命令:${data[3]}' : ''} \n参数是:\n${toString()} \n加密之前数据是:\n$data :${data.length}"); ? '子命令:${data[3]}' : ''} \n参数是:\n${toString()} \n加密之前数据是:\n$data :${data.length}");
} }
//TODO:Ï //TODO:
List<int> packageData() { List<int> packageData() {
commandData = messageDetail(); commandData = messageDetail();
List<int> commandList = []; List<int> commandList = [];

View File

@ -33,7 +33,6 @@ import 'lockNetToken_entity.dart';
class LockDetailLogic extends BaseGetXController { class LockDetailLogic extends BaseGetXController {
final LockDetailState state = LockDetailState(); final LockDetailState state = LockDetailState();
// //
void initReplySubscription() { void initReplySubscription() {
state.replySubscription = state.replySubscription =
@ -59,9 +58,8 @@ class LockDetailLogic extends BaseGetXController {
case 0x00: case 0x00:
// //
// _showFullScreenOverlay(Get.context!); // _showFullScreenOverlay(Get.context!);
cancelBlueConnetctToastTimer();
state.iSClosedUnlockSuccessfulPopup.value = true; state.iSClosedUnlockSuccessfulPopup.value = true;
cancelBlueConnetctToastTimer();
state.closedUnlockSuccessfulTimer?.cancel(); state.closedUnlockSuccessfulTimer?.cancel();
// 3 // 3
state.closedUnlockSuccessfulTimer = state.closedUnlockSuccessfulTimer =
@ -82,9 +80,10 @@ class LockDetailLogic extends BaseGetXController {
} }
// //
uploadElectricQuantityRequest(); uploadElectricQuantityRequest();
//
getLockRecordLastUploadDataTime(); getLockRecordLastUploadDataTime();
resetOpenDoorState(); resetOpenDoorState();
state.animationController!.stop();
break; break;
case 0x06: case 0x06:
// //
@ -287,10 +286,11 @@ class LockDetailLogic extends BaseGetXController {
} }
// () // ()
Future<void> senderReferEventRecordTime() async { void senderReferEventRecordTime() {
showBlueConnetctToastTimer( showBlueConnetctToastTimer(
isShowBlueConnetctToast: false, isShowBlueConnetctToast: false,
action: () { action: () {
closeLuckStatus();
BlueManage().disconnect(); BlueManage().disconnect();
}); });
BlueManage().blueSendData(BlueManage().connectDeviceName, BlueManage().blueSendData(BlueManage().connectDeviceName,

View File

@ -1324,7 +1324,6 @@ class _LockDetailPageState extends State<LockDetailPage>
return; return;
} }
state.iSOpenLock.value = true; state.iSOpenLock.value = true;
state.iSClosedUnlockSuccessfulPopup.value = false;
state.openLockBtnState.value = 1; state.openLockBtnState.value = 1;
state.animationController!.forward(); state.animationController!.forward();
@ -1347,7 +1346,6 @@ class _LockDetailPageState extends State<LockDetailPage>
return; return;
} }
state.iSOpenLock.value = false; state.iSOpenLock.value = false;
state.iSClosedUnlockSuccessfulPopup.value = false;
state.openLockBtnState.value = 1; state.openLockBtnState.value = 1;
state.animationController!.forward(); state.animationController!.forward();