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