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(); } }); }