Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
A
anchor_collect_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hywang
anchor_collect_flutter
Commits
211a0d84
Commit
211a0d84
authored
Dec 25, 2023
by
hywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修复扫描蓝牙设备异常
parent
446eab12
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
anchorkeystore.jks
android/app/anchorkeystore.jks
+0
-0
ble_service.dart
lib/controllers/ble_service.dart
+7
-7
setting_view.dart
lib/pages/setting/setting_view.dart
+2
-2
No files found.
android/app/anchorkeystore.jks
0 → 100644
View file @
211a0d84
File added
lib/controllers/ble_service.dart
View file @
211a0d84
...
...
@@ -44,13 +44,13 @@ class BleService extends GetxService {
});
_scanResultsSubscription
=
FlutterBluePlus
.
scanResults
.
listen
((
results
)
{
List
<
ScanResult
>
tempList
=
List
.
from
(
results
);
for
(
var
element
in
tempList
)
{
if
(!
EmptyUtils
.
isStrNotEmpty
(
element
.
device
.
platformName
))
{
tempList
.
remove
(
element
);
}
}
scanResults
.
value
=
tempList
;
//
List<ScanResult> tempList = List.from(results);
//
for (var element in tempList) {
//
if (!EmptyUtils.isStrNotEmpty(element.device.platformName)) {
//
tempList.remove(element);
//
}
//
}
scanResults
.
value
=
results
;
},
onError:
(
e
)
{
DialogUtils
.
showToast
(
'扫描错误'
);
});
...
...
lib/pages/setting/setting_view.dart
View file @
211a0d84
...
...
@@ -32,8 +32,8 @@ class SettingPage extends StatelessWidget {
itemCount:
BleService
.
to
.
scanResults
.
length
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
ListTile
(
title:
Text
(
BleService
.
to
.
scanResults
[
index
].
device
.
adv
Name
),
subtitle:
Text
(
BleService
.
to
.
scanResults
[
index
].
device
.
platformName
),
title:
Text
(
BleService
.
to
.
scanResults
[
index
].
device
.
platform
Name
),
subtitle:
Text
(
BleService
.
to
.
scanResults
[
index
].
device
.
remoteId
.
toString
()
),
onTap:
()=>{
logic
.
connectBle
(
context
,
index
),
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment