This commit is contained in:
wyf
2025-06-27 16:27:56 +08:00
parent ee88290dfe
commit cee6c75f26
10 changed files with 92 additions and 15 deletions

View File

@@ -601,6 +601,11 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
Obx(() {
if (mhtBlueToothController
.model.deviceDataStatus!.isNotEmpty) {
final sortedList = mhtBlueToothController
.model.deviceDataStatus!
.toList()
..sort((a, b) => b.scanResult.rssi
.compareTo(a.scanResult.rssi));
return Expanded(
child: Container(
width: double.infinity,
@@ -608,8 +613,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
...mhtBlueToothController
.model.deviceDataStatus!
...sortedList
.map((device) {
return DeviceComponentWidget(
bleDevice: device,