Skip to content

feat(connectivity_plus): add checkConnectivity.hasConnectivity() utility getter#3842

Open
EchoEllet wants to merge 3 commits into
fluttercommunity:mainfrom
EchoEllet:feat/hasConnectivity-utility
Open

feat(connectivity_plus): add checkConnectivity.hasConnectivity() utility getter#3842
EchoEllet wants to merge 3 commits into
fluttercommunity:mainfrom
EchoEllet:feat/hasConnectivity-utility

Conversation

@EchoEllet
Copy link
Copy Markdown
Contributor

@EchoEllet EchoEllet commented May 27, 2026

Description

A very minor feature that is commonly used (e.g., serverpod_flutter):

final result = await checkConnectivity();
print(result.hasConnectivity);

I have also fixed a typo in Connectivity.onConnectivityChanged and extracted duplicated doc comments between onConnectivityChanged and checkConnectivity using a template named no_connectivity_case.

Related Issues

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@EchoEllet
Copy link
Copy Markdown
Contributor Author

This PR does not modify sensors_plus, so this CI failure is most likely irrelevant.

@EchoEllet EchoEllet force-pushed the feat/hasConnectivity-utility branch from 69026c5 to e13be4c Compare May 27, 2026 23:05
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

Successfully merging this pull request may close these issues.

[Request]: Add hasConnectivity getter extension to List<ConnectivityResult>

1 participant