1.更新眠花糖ios控制页空白 2.修复ios首页第一次点击控制无效果 3.修复ios扫描蓝牙的错误提示
This commit is contained in:
@@ -63,18 +63,22 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
||||
mhtBlueToothController.startStatusPolling();
|
||||
mhtBlueToothController.search.value = "";
|
||||
mhtBlueToothController.currentDeviceMac?.value = "";
|
||||
BluetoothHelper.listenBluetoothState((isOn) {
|
||||
BluetoothHelper.listenBluetoothState((isOn) async {
|
||||
mhtBlueToothController.model.bluetooth = isOn;
|
||||
mhtBlueToothController.updateAll();
|
||||
|
||||
if (!isOn && !_isDialogShowing) {
|
||||
_isDialogShowing = true;
|
||||
mhtBlueToothController.model.blueRawData = [];
|
||||
mhtBlueToothController.model.deviceDataStatus = [];
|
||||
mhtBlueToothController.updateAll();
|
||||
_showBluetoothNotEnabledDialog().then((_) {
|
||||
_isDialogShowing = false;
|
||||
});
|
||||
await Future.delayed(Duration(seconds: 2));
|
||||
bool isReallyOn = await FlutterBluePlus.isOn;
|
||||
if (!isReallyOn) {
|
||||
_isDialogShowing = true;
|
||||
mhtBlueToothController.model.blueRawData = [];
|
||||
mhtBlueToothController.model.deviceDataStatus = [];
|
||||
mhtBlueToothController.updateAll();
|
||||
_showBluetoothNotEnabledDialog().then((_) {
|
||||
_isDialogShowing = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user