更新
This commit is contained in:
@@ -46,8 +46,11 @@ class _WifiPageState extends State<WifiPage> {
|
||||
blueteethBindController.wifiStatus = 0.obs;
|
||||
blueteethBindController.connect_wifi.value = {};
|
||||
blueteethBindController.selectWifi.value = {};
|
||||
|
||||
if (widget.type == null) {
|
||||
if (widget.type != null) {
|
||||
blueteethBindController.wifiStatus.value =
|
||||
widget.type['status']['status'];
|
||||
}
|
||||
if (widget.type['mac'] == null) {
|
||||
THapp bledevice = blueteethBindController.currentDevice!;
|
||||
bledevice.device.connect().then((Value) {
|
||||
var res2 = bledevice.isConnected;
|
||||
@@ -85,11 +88,18 @@ class _WifiPageState extends State<WifiPage> {
|
||||
Get.toNamed("/calibrationPage", arguments: 1);
|
||||
});
|
||||
} else if (aa == 'unknown') {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "获取设备网络类型失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: "获取设备网络类型失败".tr,
|
||||
// textColor: themeController.currentColor.sc9,
|
||||
// );
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "获取设备网络类型失败".tr,
|
||||
textColor: themeController.currentColor.sc9,
|
||||
);
|
||||
});
|
||||
} else {
|
||||
await initWifiStatusAndWifiList();
|
||||
}
|
||||
@@ -106,7 +116,7 @@ class _WifiPageState extends State<WifiPage> {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
dealWifi(widget.type).then((aa) {
|
||||
dealWifi(widget.type['mac']).then((aa) {
|
||||
print("object");
|
||||
});
|
||||
}
|
||||
@@ -188,7 +198,7 @@ class _WifiPageState extends State<WifiPage> {
|
||||
left: 0,
|
||||
child: returnIconButtom,
|
||||
),
|
||||
if (widget.type == null)
|
||||
if (widget.type['mac'] == null)
|
||||
Positioned(
|
||||
right: 20.rpx,
|
||||
child: CustomCard(
|
||||
|
||||
Reference in New Issue
Block a user