修复wifi配置含中文
This commit is contained in:
@@ -583,7 +583,8 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
.wifiStatus
|
||||
.value =
|
||||
aa != null ? 1 : 0;
|
||||
if (aa != null) {
|
||||
if (aa != null&&
|
||||
aa != false) {
|
||||
updateDeviceBindStatus(
|
||||
blueteethBindController
|
||||
.currentDeviceMac!
|
||||
@@ -598,6 +599,9 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
.sc2,
|
||||
);
|
||||
} else {
|
||||
blueteethBindController
|
||||
.connect_wifi
|
||||
.value = {};
|
||||
TopSlideNotification
|
||||
.show(
|
||||
context,
|
||||
@@ -609,6 +613,9 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
blueteethBindController
|
||||
.connect_wifi
|
||||
.value = {};
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "配网失败".tr,
|
||||
@@ -619,6 +626,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize:
|
||||
@@ -973,7 +981,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
||||
blueteethBindController.blueConnectFlag.value = 2;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "蓝牙绑定.连接成功".tr,
|
||||
text: "连接成功".tr,
|
||||
textColor: themeController.currentColor.sc2,
|
||||
);
|
||||
blueteethBindController.currentDevice = bledevice;
|
||||
|
||||
@@ -526,6 +526,12 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
||||
wifiItem['ssid'] ??
|
||||
'未命名'.tr,
|
||||
onConfirm: () async {
|
||||
blueteethBindController
|
||||
.currentDevice!
|
||||
.logingStream
|
||||
.listen((event) {
|
||||
ef.log("[命令日志]:$event");
|
||||
});
|
||||
blueteethBindController
|
||||
.selectWifi
|
||||
.value = wifiItem;
|
||||
@@ -539,7 +545,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
||||
var aa = await getDeviceWifiStatus(
|
||||
blueteethBindController
|
||||
.currentDevice!,
|
||||
1);
|
||||
1,link: true);
|
||||
blueteethBindController
|
||||
.selectWifi
|
||||
.value = {};
|
||||
@@ -556,8 +562,12 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
||||
blueteethBindController
|
||||
.wifiStatus
|
||||
.value =
|
||||
aa != null ? 1 : 0;
|
||||
if (aa != null) {
|
||||
(aa != null &&
|
||||
aa != false)
|
||||
? 1
|
||||
: 0;
|
||||
if (aa != null &&
|
||||
aa != false) {
|
||||
updateDeviceBindStatus(
|
||||
blueteethBindController
|
||||
.currentDeviceMac!
|
||||
@@ -572,6 +582,9 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
||||
.sc2,
|
||||
);
|
||||
} else {
|
||||
blueteethBindController
|
||||
.connect_wifi
|
||||
.value = {};
|
||||
TopSlideNotification
|
||||
.show(
|
||||
context,
|
||||
@@ -583,6 +596,9 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
blueteethBindController
|
||||
.connect_wifi
|
||||
.value = {};
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "配网失败".tr,
|
||||
@@ -947,7 +963,7 @@ class _MHTWifiAfterPageState extends State<MHTWifiAfterPage> {
|
||||
blueteethBindController.blueConnectFlag.value = 2;
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "蓝牙绑定.连接成功".tr,
|
||||
text: "连接成功".tr,
|
||||
textColor: themeController.currentColor.sc2,
|
||||
);
|
||||
blueteethBindController.currentDevice = bledevice;
|
||||
|
||||
Reference in New Issue
Block a user