Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering Bluetooth Device #203

Open
pradeepktg opened this issue Aug 4, 2023 · 0 comments
Open

Filtering Bluetooth Device #203

pradeepktg opened this issue Aug 4, 2023 · 0 comments

Comments

@pradeepktg
Copy link

Problem summary

Hi, When I try to filter the Bluetooth device based on the device type = classic, all the devices are showing up. Code is given below

final existingIndex = results.indexWhere((element) =>
((element.device.address == r.device.address) &&
(element.device.type.stringValue == "classic")));

also tried with the underlying value == 1
final existingIndex = results.indexWhere((element) =>
((element.device.address == r.device.address) &&
(element.device.type.underlyingValue == 1)));

Filtering not working on both cases.

In Android, devices are filtered by the device class, what is the equivalent of Android in Flutter?
Android : device.bluetoothClass.deviceClass.and(0x00000FFF)) == 280

Environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant