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

Make connectivity_plus optional. #1415

Open
doawoo opened this issue Feb 27, 2024 · 2 comments
Open

Make connectivity_plus optional. #1415

doawoo opened this issue Feb 27, 2024 · 2 comments
Labels
enhancement New feature or request Priority: Low Low priority, would be cool to include inside the next release PRs encouraged PRs are welcome if stakeholders want to take ownership

Comments

@doawoo
Copy link

doawoo commented Feb 27, 2024

Is your feature request related to a problem? Please describe.
connectivity_plus should be an optional dependency -- We're currently using Flutter in a very slimmed down embedded Linux environment that does not have dbus, or NetworkManager. The issue is, this package uses connectivity_plus to check if the client is "online" in generated Flutter Hooks with subscriptions. We're connecting to a local GQL server, on the same device, so this check isn't useful, and is instead creating very noisy stack traces as the plugin tries to connect to NetworkManager's dbus. (Which obviously does not exist.)

Describe the solution you'd like
I think a good solution would be to allow either a flag to disable this connectivity check in the useSubscription hook, or allow us to override that connectivity check function with a custom one.

Describe alternatives you've considered
Installing dbus, and NetworkManager is obviously a solution, but that bloats our Firmware up by a huge amount, and adds even more dependancies we need to maintain in our Linux distribution.

Additional context
Using:

  • flutter_hooks
  • codegen to generate hooks based on .graphql files.
@doawoo doawoo added the enhancement New feature or request label Feb 27, 2024
@vincenzopalazzo vincenzopalazzo added PRs encouraged PRs are welcome if stakeholders want to take ownership Priority: Low Low priority, would be cool to include inside the next release labels Apr 15, 2024
@vincenzopalazzo
Copy link
Collaborator

This would be really nice to have

@doawoo
Copy link
Author

doawoo commented Sep 26, 2024

I'll eventually get to building a PR for this, but, for those who are running into this: just override connectivity_plus in your pubspec.yaml to a local package, and return a sane list and stream for the two functions required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority: Low Low priority, would be cool to include inside the next release PRs encouraged PRs are welcome if stakeholders want to take ownership
Projects
None yet
Development

No branches or pull requests

2 participants