From 2fb3c7d2b557f8c8b43492fc234afb8cc1ca63a1 Mon Sep 17 00:00:00 2001 From: liyi Date: Wed, 12 Mar 2025 14:22:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E7=94=B5=E6=9C=BA?= =?UTF-8?q?=E5=8A=9F=E7=8E=87=E6=93=8D=E4=BD=9C=E6=88=90=E5=8A=9F=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E3=80=81=E4=B8=8D=E5=9C=A8=E9=94=81=E8=BE=B9=E5=BA=94?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=93=8D=E4=BD=9C=E5=A4=B1=E8=B4=A5=E3=80=81?= =?UTF-8?q?=E6=97=A0=E7=BD=91=E7=BB=9C=E5=9C=A8=E7=82=B9=E5=87=BB=E6=97=B6?= =?UTF-8?q?=E5=BA=94=E6=8F=90=E7=A4=BA=E7=BD=91=E7=BB=9C=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lockSet/motorPower/motorPower_logic.dart | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/main/lockDetail/lockSet/motorPower/motorPower_logic.dart b/lib/main/lockDetail/lockSet/motorPower/motorPower_logic.dart index 44b72e64..79f860ea 100755 --- a/lib/main/lockDetail/lockSet/motorPower/motorPower_logic.dart +++ b/lib/main/lockDetail/lockSet/motorPower/motorPower_logic.dart @@ -30,9 +30,10 @@ class MotorPowerLogic extends BaseGetXController { state.lockSetInfoData.value.lockSettingInfo!.openDirectionValue = state.motorTorsion.value; - eventBus - .fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value)); - showToast('操作成功'.tr); + showToast('操作成功'.tr, something: () { + eventBus + .fire(PassCurrentLockInformationEvent(state.lockSetInfoData.value)); + }); } } @@ -80,6 +81,7 @@ class MotorPowerLogic extends BaseGetXController { switch (status) { case 0x00: //成功 + cancelBlueConnetctToastTimer(); _setLockSetGeneralSetting(); break; case 0x06: @@ -123,6 +125,10 @@ class MotorPowerLogic extends BaseGetXController { // 设置支持功能(带参数) Future sendOpenDoorDirection() async { + showEasyLoading(); + showBlueConnetctToastTimer(action: () { + dismissEasyLoading(); + }); BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState connectionState) async { if (connectionState == BluetoothConnectionState.connected) { @@ -149,6 +155,10 @@ class MotorPowerLogic extends BaseGetXController { needAuthor: 1, publicKey: getPublicKeyList, privateKey: getPrivateKeyList); + } else if (connectionState == BluetoothConnectionState.disconnected) { + dismissEasyLoading(); + cancelBlueConnetctToastTimer(); + showBlueConnetctToast(); } }); }