fix:修复蓝牙长时间占用的问题
This commit is contained in:
parent
719f39c6d1
commit
8dcc1c7be3
@ -696,7 +696,8 @@ class BlueManage {
|
|||||||
// if(bluetoothConnectDevice != null && bluetoothConnectDevice!.connectionState == BluetoothConnectionState.connected){
|
// if(bluetoothConnectDevice != null && bluetoothConnectDevice!.connectionState == BluetoothConnectionState.connected){
|
||||||
connectDeviceMacAddress = "";
|
connectDeviceMacAddress = "";
|
||||||
if (bluetoothConnectionState == BluetoothConnectionState.connected) {
|
if (bluetoothConnectionState == BluetoothConnectionState.connected) {
|
||||||
await bluetoothConnectDevice!.disconnect();
|
//加快蓝牙断连
|
||||||
|
await bluetoothConnectDevice!.disconnect(timeout: 1);
|
||||||
AppLog.log("断开连接成功");
|
AppLog.log("断开连接成功");
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user