diff --git a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart index b5d3a1aa..edf17bc0 100755 --- a/lib/main/lockDetail/lockDetail/lockDetail_logic.dart +++ b/lib/main/lockDetail/lockDetail/lockDetail_logic.dart @@ -426,25 +426,26 @@ class LockDetailLogic extends BaseGetXController { AppLog.log('command:${command}'); showBlueConnetctToastTimer( - outTimer: 20, - action: () async { - final String getMobile = (await Storage.getMobile())!; - ApmHelper.instance.trackEvent('open_lock', { - 'lock_name': state.keyInfos.value.lockName!, - 'account': - getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!, - 'date': DateTool().getNowDateWithType(1), - 'open_lock_result': '超时', - }); - - resetOpenDoorState(); - blueManageDisconnect(); - BuglyTool.uploadException( - message: '开门超时处理-开锁失败', - detail: '开门超时,断开连接,开锁失败--OpenLockCommand:$command', - upload: true); + outTimer: 20, + action: () async { + final String getMobile = (await Storage.getMobile())!; + ApmHelper.instance.trackEvent('open_lock', { + 'lock_name': state.keyInfos.value.lockName!, + 'account': + getMobile.isNotEmpty ? getMobile : (await Storage.getEmail())!, + 'date': DateTool().getNowDateWithType(1), + 'open_lock_result': '超时', }); + resetOpenDoorState(); + blueManageDisconnect(); + BuglyTool.uploadException( + message: '开门超时处理-开锁失败', + detail: '开门超时,断开连接,开锁失败--OpenLockCommand:$command', + upload: true); + }, + ); + BlueManage() .blueSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!, (BluetoothConnectionState deviceConnectionState) async { @@ -481,9 +482,9 @@ class LockDetailLogic extends BaseGetXController { 'open_lock_result': '断开连接', }); - if (state.ifCurrentScreen.value == true) { - showBlueConnetctToast(); - } + // if (state.ifCurrentScreen.value == true) { + // showBlueConnetctToast(); + // } resetOpenDoorState(); } }); @@ -658,7 +659,9 @@ class LockDetailLogic extends BaseGetXController { // 远程开锁 Future remoteOpenLock() async { final LoginEntity entity = await ApiRepository.to.remoteOpenLock( - lockId: state.keyInfos.value.lockId.toString(), timeOut: 60); + lockId: state.keyInfos.value.lockId.toString(), + timeOut: 60, + ); if (entity.errorCode!.codeIsSuccessful) { showToast('已开锁'.tr); }