From 43475c2a8b424eed6206499c028597a771f5a348 Mon Sep 17 00:00:00 2001 From: wyf <494641114@qq.com> Date: Wed, 27 Aug 2025 15:24:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0wifi=E5=BC=BA=E5=BA=A6?= =?UTF-8?q?=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/color/appConstants.dart | 4 ++ .../after/after_wifi_page_person.dart | 6 +-- lib/pages/device_bind/wifi_page.dart | 6 +-- lib/pages/device_bind/wifi_page_person.dart | 6 +-- lib/pages/mh_page/device/mht_wifi_page.dart | 6 +-- .../mh_page/device/mht_wifi_page_after.dart | 6 +-- pubspec.lock | 50 +++++++++---------- 7 files changed, 44 insertions(+), 40 deletions(-) diff --git a/lib/common/color/appConstants.dart b/lib/common/color/appConstants.dart index be52cef..d51649f 100644 --- a/lib/common/color/appConstants.dart +++ b/lib/common/color/appConstants.dart @@ -58,6 +58,10 @@ class AppConstants { int ent_type = APPPackageType.TH.code; //1.默认太和 2.欢睡 3.眠花糖 // int ent_type = APPPackageType.HUANSHUI.code; //1.默认太和 2.欢睡 3.眠花糖 int text_length = 8; + + int wifi1 = -45; + int wifi2 = -60; + int wifi3 = -75; } //获取协议地址 diff --git a/lib/pages/device_bind/after/after_wifi_page_person.dart b/lib/pages/device_bind/after/after_wifi_page_person.dart index d648247..cabb1a3 100644 --- a/lib/pages/device_bind/after/after_wifi_page_person.dart +++ b/lib/pages/device_bind/after/after_wifi_page_person.dart @@ -843,7 +843,7 @@ class _AfterWifiPagePersonState extends State { int? rssi = int.tryParse(wifiItem['rssi'].toString()); if (rssi != null) { - if (rssi >= -30) { + if (rssi >= AppConstants().wifi1) { return Container( width: 40.rpx, height: 40.rpx, @@ -851,7 +851,7 @@ class _AfterWifiPagePersonState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi4.png"), ); - } else if (rssi >= -45) { + } else if (rssi >= AppConstants().wifi2) { return Container( width: 40.rpx, height: 40.rpx, @@ -859,7 +859,7 @@ class _AfterWifiPagePersonState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi3.png"), ); - } else if (rssi >= -60) { + } else if (rssi >= AppConstants().wifi3) { return Container( width: 40.rpx, height: 40.rpx, diff --git a/lib/pages/device_bind/wifi_page.dart b/lib/pages/device_bind/wifi_page.dart index 15cb3d7..8f51458 100644 --- a/lib/pages/device_bind/wifi_page.dart +++ b/lib/pages/device_bind/wifi_page.dart @@ -949,7 +949,7 @@ class _WifiPageState extends State { int? rssi = int.tryParse(wifiItem['rssi'].toString()); if (rssi != null) { - if (rssi >= -30) { + if (rssi >= AppConstants().wifi1) { return Container( width: 40.rpx, height: 40.rpx, @@ -957,7 +957,7 @@ class _WifiPageState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi4.png"), ); - } else if (rssi >= -45) { + } else if (rssi >= AppConstants().wifi2) { return Container( width: 40.rpx, height: 40.rpx, @@ -965,7 +965,7 @@ class _WifiPageState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi3.png"), ); - } else if (rssi >= -60) { + } else if (rssi >=AppConstants().wifi3) { return Container( width: 40.rpx, height: 40.rpx, diff --git a/lib/pages/device_bind/wifi_page_person.dart b/lib/pages/device_bind/wifi_page_person.dart index 7b5cc4a..46a2963 100644 --- a/lib/pages/device_bind/wifi_page_person.dart +++ b/lib/pages/device_bind/wifi_page_person.dart @@ -843,7 +843,7 @@ class _WifiPagePersonState extends State { int? rssi = int.tryParse(wifiItem['rssi'].toString()); if (rssi != null) { - if (rssi >= -30) { + if (rssi >= AppConstants().wifi1) { return Container( width: 40.rpx, height: 40.rpx, @@ -851,7 +851,7 @@ class _WifiPagePersonState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi4.png"), ); - } else if (rssi >= -45) { + } else if (rssi >= AppConstants().wifi2) { return Container( width: 40.rpx, height: 40.rpx, @@ -859,7 +859,7 @@ class _WifiPagePersonState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi3.png"), ); - } else if (rssi >= -60) { + } else if (rssi >= AppConstants().wifi3) { return Container( width: 40.rpx, height: 40.rpx, diff --git a/lib/pages/mh_page/device/mht_wifi_page.dart b/lib/pages/mh_page/device/mht_wifi_page.dart index bb1f3fe..d421637 100644 --- a/lib/pages/mh_page/device/mht_wifi_page.dart +++ b/lib/pages/mh_page/device/mht_wifi_page.dart @@ -855,7 +855,7 @@ class _MHTWifiPageState extends State { int? rssi = int.tryParse(wifiItem['rssi'].toString()); if (rssi != null) { - if (rssi >= -30) { + if (rssi >= AppConstants().wifi1) { return Container( width: 40.rpx, height: 40.rpx, @@ -863,7 +863,7 @@ class _MHTWifiPageState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi4.png"), ); - } else if (rssi >= -45) { + } else if (rssi >= AppConstants().wifi2) { return Container( width: 40.rpx, height: 40.rpx, @@ -871,7 +871,7 @@ class _MHTWifiPageState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi3.png"), ); - } else if (rssi >= -60) { + } else if (rssi >= AppConstants().wifi3) { return Container( width: 40.rpx, height: 40.rpx, diff --git a/lib/pages/mh_page/device/mht_wifi_page_after.dart b/lib/pages/mh_page/device/mht_wifi_page_after.dart index cde5d06..9190c48 100644 --- a/lib/pages/mh_page/device/mht_wifi_page_after.dart +++ b/lib/pages/mh_page/device/mht_wifi_page_after.dart @@ -830,7 +830,7 @@ class _MHTWifiAfterPageState extends State { int? rssi = int.tryParse(wifiItem['rssi'].toString()); if (rssi != null) { - if (rssi >= -30) { + if (rssi >= AppConstants().wifi1) { return Container( width: 40.rpx, height: 40.rpx, @@ -838,7 +838,7 @@ class _MHTWifiAfterPageState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi4.png"), ); - } else if (rssi >= -45) { + } else if (rssi >= AppConstants().wifi2) { return Container( width: 40.rpx, height: 40.rpx, @@ -846,7 +846,7 @@ class _MHTWifiAfterPageState extends State { decoration: BoxDecoration(shape: BoxShape.circle), child: Image.asset("assets/img/wifi3.png"), ); - } else if (rssi >= -60) { + } else if (rssi >= AppConstants().wifi3) { return Container( width: 40.rpx, height: 40.rpx, diff --git a/pubspec.lock b/pubspec.lock index 7a7b422..090d8f7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -211,10 +211,10 @@ packages: dependency: transitive description: name: built_value - sha256: "0b1b12a0a549605e5f04476031cd0bc91ead1d7c8e830773a18ee54179b3cb62" + sha256: ba95c961bafcd8686d1cf63be864eb59447e795e124d98d6a27d91fcd13602fb url: "https://pub.flutter-io.cn" source: hosted - version: "8.11.0" + version: "8.11.1" cached_network_image: dependency: transitive description: @@ -315,10 +315,10 @@ packages: dependency: "direct main" description: name: connectivity_plus - sha256: "051849e2bd7c7b3bc5844ea0d096609ddc3a859890ec3a9ac4a65a2620cc1f99" + sha256: b5e72753cf63becce2c61fd04dfe0f1c430cc5278b53a1342dc5ad839eab29ec url: "https://pub.flutter-io.cn" source: hosted - version: "6.1.4" + version: "6.1.5" connectivity_plus_platform_interface: dependency: transitive description: @@ -411,10 +411,10 @@ packages: dependency: transitive description: name: dio - sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9" + sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 url: "https://pub.flutter-io.cn" source: hosted - version: "5.8.0+1" + version: "5.9.0" dio_web_adapter: dependency: transitive description: @@ -444,7 +444,7 @@ packages: description: path: "." ref: main - resolved-ref: d2ed03c1b1ca4db4a0bdbdc443d3c86d08048003 + resolved-ref: "9a4baafc40913f48d707dbe2ed6a9590f35f809a" url: "https://gitea.wslpc.real.he-info.cn:94/flutter/easydevice.git" source: git version: "0.0.1" @@ -453,7 +453,7 @@ packages: description: path: "." ref: main - resolved-ref: "9c4390c05d87832531a94aa8d02059a1e26eb354" + resolved-ref: a1173d7a01589144d32ca33c300464646274b8fe url: "https://gitea.wslpc.real.he-info.cn:94/flutter/easyweb.git" source: git version: "0.0.1" @@ -470,7 +470,7 @@ packages: description: path: "." ref: main - resolved-ref: "6b0a08903ae91ae57deaa783b2649858867d5eba" + resolved-ref: c95c04d502b867e1b3da1257a68493609c645ce7 url: "https://gitea.wslpc.real.he-info.cn:94/flutter/ef.git" source: git version: "0.0.1" @@ -931,10 +931,10 @@ packages: dependency: transitive description: name: google_fonts - sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + sha256: df9763500dadba0155373e9cb44e202ce21bd9ed5de6bdbd05c5854e86839cb8 url: "https://pub.flutter-io.cn" source: hosted - version: "6.2.1" + version: "6.3.0" google_identity_services_web: dependency: transitive description: @@ -995,10 +995,10 @@ packages: dependency: transitive description: name: http - sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" + sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 url: "https://pub.flutter-io.cn" source: hosted - version: "1.4.0" + version: "1.5.0" http2: dependency: transitive description: @@ -1203,10 +1203,10 @@ packages: dependency: transitive description: name: mapbox_search - sha256: "5e1237301a5485443a675eb65fb709e319f25fbf91fb1de4dcdb5ac5d59a33a5" + sha256: "1ff2f2ac4471ff59a00d55371bbb82f337e588fcefd4019f66aec372bb4901fc" url: "https://pub.flutter-io.cn" source: hosted - version: "4.3.1" + version: "4.3.2" matcher: dependency: transitive description: @@ -1259,10 +1259,10 @@ packages: dependency: transitive description: name: minio - sha256: "9fa3d041237d3a0dabfd14c11f6adbefe71f6973d64192f6f1fc3e174013001e" + sha256: ee2ce47766e46c7d164f960f2f5ed6a9a82844d877f6b82574f6876ec50c56d1 url: "https://pub.flutter-io.cn" source: hosted - version: "3.5.7" + version: "3.5.8" mobile_scanner: dependency: "direct main" description: @@ -1339,18 +1339,18 @@ packages: dependency: transitive description: name: package_info_plus - sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" + sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968" url: "https://pub.flutter-io.cn" source: hosted - version: "8.3.0" + version: "8.3.1" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" + sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086" url: "https://pub.flutter-io.cn" source: hosted - version: "3.2.0" + version: "3.2.1" packages_extensions: dependency: transitive description: @@ -1595,10 +1595,10 @@ packages: dependency: transitive description: name: provider - sha256: "4abbd070a04e9ddc287673bf5a030c7ca8b685ff70218720abab8b092f53dd84" + sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" url: "https://pub.flutter-io.cn" source: hosted - version: "6.1.5" + version: "6.1.5+1" pub_semver: dependency: transitive description: @@ -2208,10 +2208,10 @@ packages: dependency: transitive description: name: watcher - sha256: "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a" + sha256: "5bf046f41320ac97a469d506261797f35254fa61c641741ef32dacda98b7d39c" url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.2" + version: "1.1.3" weather: dependency: "direct main" description: