更新ios蓝牙权限
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
[
|
[
|
||||||
"assets/miniapp/mhtControl_1.0.60.zip"
|
"assets/miniapp/mhtControl_1.0.63.zip"
|
||||||
]
|
]
|
||||||
Binary file not shown.
@@ -78,12 +78,12 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
child:CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
themeController.currentColor.sc1,
|
Colors.white,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
@@ -388,12 +388,12 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
child:CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
themeController.currentColor.sc1,
|
themeController.currentColor.sc1,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
|
|||||||
@@ -170,11 +170,11 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
themeController.currentColor.sc1,
|
Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (blueteethBindController.netType.value == 0) {
|
if (blueteethBindController.netType.value == 0) {
|
||||||
@@ -182,11 +182,11 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
themeController.currentColor.sc1,
|
themeController.currentColor.sc1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (blueteethBindController.wifiConnectStatus.value ==
|
if (blueteethBindController.wifiConnectStatus.value ==
|
||||||
@@ -195,11 +195,11 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
themeController.currentColor.sc1,
|
themeController.currentColor.sc1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
@@ -643,12 +643,16 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
width: 32.rpx,
|
width: 32.rpx,
|
||||||
height: 32.rpx,
|
height: 32.rpx,
|
||||||
child:
|
child:
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor:
|
||||||
themeController.currentColor.sc1,
|
AlwaysStoppedAnimation<
|
||||||
),
|
Color>(
|
||||||
),
|
themeController
|
||||||
|
.currentColor
|
||||||
|
.sc1,
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
getWifiIconByRsso(
|
getWifiIconByRsso(
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _initController() {
|
void _initController() {
|
||||||
blueteethBindController.netType.value = 0;
|
blueteethBindController.netType.value = 0;
|
||||||
blueteethBindController.connectStatus.value = 0;
|
blueteethBindController.connectStatus.value = 0;
|
||||||
blueteethBindController.wifiList = [].obs;
|
blueteethBindController.wifiList = [].obs;
|
||||||
@@ -166,24 +166,24 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
child:CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
themeController.currentColor.sc1,
|
Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (blueteethBindController.netType.value == 0) {
|
if (blueteethBindController.netType.value == 0) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
child:CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
themeController.currentColor.sc1,
|
themeController.currentColor.sc1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (blueteethBindController.wifiConnectStatus.value ==
|
if (blueteethBindController.wifiConnectStatus.value ==
|
||||||
@@ -191,12 +191,12 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 24.rpx,
|
width: 24.rpx,
|
||||||
height: 24.rpx,
|
height: 24.rpx,
|
||||||
child:CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
themeController.currentColor.sc1,
|
themeController.currentColor.sc1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
@@ -206,7 +206,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
child: returnIconButtom,
|
child: returnIconButtom,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -616,12 +616,16 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
|||||||
width: 32.rpx,
|
width: 32.rpx,
|
||||||
height: 32.rpx,
|
height: 32.rpx,
|
||||||
child:
|
child:
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
valueColor: AlwaysStoppedAnimation<Color>(
|
valueColor:
|
||||||
themeController.currentColor.sc1,
|
AlwaysStoppedAnimation<
|
||||||
),
|
Color>(
|
||||||
),
|
themeController
|
||||||
|
.currentColor
|
||||||
|
.sc1,
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
getWifiIconByRsso(
|
getWifiIconByRsso(
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ Future<Map> checkBlueToothPermissin() async {
|
|||||||
|
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
PermissionStatus isBleGranted = await Permission.bluetooth.request();
|
PermissionStatus isBleGranted = await Permission.bluetooth.request();
|
||||||
if (isBleGranted.isGranted) {
|
if (!isBleGranted.isGranted) {
|
||||||
// startBluetoothScanning();
|
// startBluetoothScanning();
|
||||||
await FlutterBluePlus.startScan(timeout: Duration(seconds: 10));
|
await FlutterBluePlus.startScan(timeout: Duration(seconds: 10));
|
||||||
data = {
|
data = {
|
||||||
|
|||||||
@@ -62,7 +62,24 @@ class WebviewTestController extends GetControllerEx<WebviewTestModel> {
|
|||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
web.jsbridge!.bind((bridge) {
|
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) {});
|
// ef.kvroot.devicelist.listen((x) {});
|
||||||
bridge.sdk.updateDeviceRoute((args) async {
|
bridge.sdk.updateDeviceRoute((args) async {
|
||||||
ef.log('updateDeviceRoute: $args');
|
ef.log('updateDeviceRoute: $args');
|
||||||
|
|||||||
Reference in New Issue
Block a user