更新
This commit is contained in:
@@ -136,7 +136,6 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
|
||||
});
|
||||
|
||||
await FlutterBluePlus.startScan(timeout: Duration(seconds: 10));
|
||||
|
||||
|
||||
_scanSubscription = FlutterBluePlus.scanResults.listen((results) {
|
||||
if (!mounted) return;
|
||||
@@ -147,7 +146,8 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
|
||||
|
||||
final filteredResults = results.where((r) {
|
||||
final isTarget = r.rssi > signalThreshold &&
|
||||
r.advertisementData.localName == "AITH-V2" &&
|
||||
(r.advertisementData.localName == "AITH-V2" ||
|
||||
r.advertisementData.localName == "SLAVE") &&
|
||||
r.advertisementData.manufacturerData.containsKey(0xFFED);
|
||||
|
||||
if (!isTarget) return false;
|
||||
@@ -622,7 +622,7 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
|
||||
// '匹配出的外围设备'.tr +
|
||||
// "(${blueteethBindController.model.betDevicelist!.length})",
|
||||
'匹配出的外围设备'.tr +
|
||||
"(${blueteethBindController.model.blelist!.length})",
|
||||
"(${blueteethBindController.model.betDevicelist!.length})",
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
@@ -647,11 +647,12 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
...blueteethBindController.model.blelist!
|
||||
.map((device) =>
|
||||
SingleBlueteethDeviceCompoentWidget(
|
||||
// device: device,
|
||||
bleDevice: device,
|
||||
))
|
||||
.map((device) {
|
||||
return SingleBlueteethDeviceCompoentWidget(
|
||||
// device: device,
|
||||
bleDevice: device,
|
||||
);
|
||||
})
|
||||
.toList()
|
||||
.divide(SizedBox(height: 30.rpx))
|
||||
.addToEnd(SizedBox(height: 30.rpx)),
|
||||
|
||||
Reference in New Issue
Block a user