更新ios蓝牙权限

This commit is contained in:
wyf
2025-08-21 16:35:14 +08:00
parent 5cb59bb5be
commit 841f143f97
7 changed files with 85 additions and 60 deletions

View File

@@ -1,3 +1,3 @@
[
"assets/miniapp/mhtControl_1.0.60.zip"
"assets/miniapp/mhtControl_1.0.63.zip"
]

View File

@@ -81,7 +81,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
Colors.white,
),
),
);

View File

@@ -172,7 +172,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
Colors.white,
),
),
);
@@ -645,8 +645,12 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
child:
CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
valueColor:
AlwaysStoppedAnimation<
Color>(
themeController
.currentColor
.sc1,
),
),
)

View File

@@ -169,7 +169,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
Colors.white,
),
),
);
@@ -618,8 +618,12 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
child:
CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(
themeController.currentColor.sc1,
valueColor:
AlwaysStoppedAnimation<
Color>(
themeController
.currentColor
.sc1,
),
),
)

View File

@@ -206,7 +206,7 @@ Future<Map> checkBlueToothPermissin() async {
if (Platform.isIOS) {
PermissionStatus isBleGranted = await Permission.bluetooth.request();
if (isBleGranted.isGranted) {
if (!isBleGranted.isGranted) {
// startBluetoothScanning();
await FlutterBluePlus.startScan(timeout: Duration(seconds: 10));
data = {

View File

@@ -62,7 +62,24 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
);
try {
web.jsbridge!.bind((bridge) {
var minible = Minibleapp(bridge: bridge);
var minible = Minibleapp(
bridge: bridge,
onConnect: (args1, args2) {
final devices = args1.devices as Map<String, dynamic>;
final mac = args2 as String;
// 找出对应设备
final device = devices[mac];
if (device != null) {
ef.log('Minibleapp connected: $mac -> $device');
return device;
} else {
ef.log('Minibleapp connected: $mac not found in devices');
return null;
}
},
);
// ef.kvroot.devicelist.listen((x) {});
bridge.sdk.updateDeviceRoute((args) async {
ef.log('updateDeviceRoute: $args');