File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -50,13 +50,19 @@ class ScanResultTile extends StatelessWidget {
50
50
);
51
51
}
52
52
53
+ String getNiceHexArray (List <int > bytes) {
54
+ return '[${bytes .map ((i ) => i .toRadixString (16 ).padLeft (2 , '0' )).join (', ' )}]'
55
+ .toUpperCase ();
56
+ }
57
+
53
58
String getNiceManufacturerData (Map <int , List <int >> data) {
54
59
if (data.isEmpty) {
55
60
return null ;
56
61
}
57
62
List <String > res = [];
58
63
data.forEach ((id, bytes) {
59
- res.add ('${id .toRadixString (16 ).toUpperCase ()}: $bytes ' );
64
+ res.add (
65
+ '${id .toRadixString (16 ).toUpperCase ()}: ${getNiceHexArray (bytes )}' );
60
66
});
61
67
return res.join (', ' );
62
68
}
@@ -67,7 +73,7 @@ class ScanResultTile extends StatelessWidget {
67
73
}
68
74
List <String > res = [];
69
75
data.forEach ((id, bytes) {
70
- res.add ('$id : $bytes ' );
76
+ res.add ('$id : ${ getNiceHexArray ( bytes )} ' );
71
77
});
72
78
return res.join (', ' );
73
79
}
@@ -98,7 +104,7 @@ class ScanResultTile extends StatelessWidget {
98
104
context,
99
105
'Service UUIDs' ,
100
106
(result.advertisementData.serviceUuids.isNotEmpty)
101
- ? result.advertisementData.serviceUuids.join (', ' )
107
+ ? result.advertisementData.serviceUuids.join (', ' ). toUpperCase ()
102
108
: 'N/A' ),
103
109
_buildAdvRow (context, 'Service Data' ,
104
110
getNiceServiceData (result.advertisementData.serviceData) ?? 'N/A' ),
You can’t perform that action at this time.
0 commit comments