更新ios蓝牙扫描

This commit is contained in:
wyf
2025-08-20 14:06:00 +08:00
parent 8b26c4b8fa
commit 7c2d169ab3
5 changed files with 120 additions and 34 deletions

View File

@@ -133,9 +133,14 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
_startPeriodicScan();
} else {
// showToast("蓝牙开关或蓝牙权限未开启,请开启蓝牙开关与蓝牙权限".tr, closeTime: 7);
TopSlideNotification.show(context,
text: "蓝牙开关或蓝牙权限未开启,请开启蓝牙开关与蓝牙权限".tr,
textColor: themeController.currentColor.sc9);
try {
_startScanning();
_startPeriodicScan();
} catch (e) {
TopSlideNotification.show(context,
text: "蓝牙权限未开启,请在设置中开启蓝牙权限".tr,
textColor: themeController.currentColor.sc9);
}
}
} else if (Platform.isAndroid) {
try {