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

FlutterBluePlus.state behaves strange. #13

Closed
ghost opened this issue Feb 24, 2022 · 4 comments
Closed

FlutterBluePlus.state behaves strange. #13

ghost opened this issue Feb 24, 2022 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2022

There were similar issues in the upstream repository already:

And it's still an issue. In my case a class that is provided with provider package at the root of the widget tree is trying to keep connection with any device that can act as a gateway to a mesh network between IoT devices. It's doing this in the background and listens to the state field to do it only when Bluetooth is turned on.

In the same time widgets that require gateway connection, so user can make any interaction with the network, are listening state to indicate that gateway is not available, because Bluetooth is turned off (other reasons may be that it's just not around or location services are disabled). Of course it's abstracted to a single class like BluetoothNotAvailableDialog, but this still leaves a single instance of that service class and multiple instances of the dialog class and they cannot listen to state field at the same time, because only one of them receives events and the rest do not.

There already exists a pull request which fixes the issue. It's pretty small change so should be easy to review and merge.

@SeekayOng
Copy link

Kindly solve this issue please

@MrCsabaToth
Copy link
Contributor

MrCsabaToth commented Jun 27, 2022

Please merge that referenced PR pauldemarco/flutter_blue#609 so I don't have to maintain my own fork of a fork yet again.

@boskokg
Copy link
Owner

boskokg commented Jul 23, 2022

Thanks. commited

@boskokg boskokg closed this as completed Jul 23, 2022
@MrCsabaToth
Copy link
Contributor

Yes! My custom fork is now closer to the upstream!

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

3 participants