This commit is contained in:
wyf
2025-07-08 18:30:02 +08:00
parent a5fd8d7d04
commit 37a1615234
7 changed files with 56 additions and 8 deletions

View File

@@ -107,12 +107,14 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
// 导航到下一页
if (blueteethBindController.wifiStatus.value != 1) {
showConfirmDialog(context, Container(), "未配置网络提示".tr, onConfirm: () {
showConfirmDialog(context, Container(), "未配置网络提示".tr, onConfirm: () async {
_cleanupResources();
await _disconnectDevice();
Get.toNamed("/calibrationPage");
}, onCancel: () {});
} else {
_cleanupResources();
await _disconnectDevice();
Get.toNamed("/calibrationPage");
}
}
@@ -1101,7 +1103,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
);
}
void _disconnectDevice() async {
Future<void> _disconnectDevice() async {
try {
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
await bledevice.disconnect();