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

docs(connectivity_plus): Specify behavior when there is no connectivi… #2753

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

huycn
Copy link
Contributor

@huycn huycn commented Mar 25, 2024

Document on behavior of ConnectivityResult.none (#2752)

With the latest changes in API, connectivity is exposed as a list of available connections instead of single state as before. When there is no connections, the list contains a single item ConnectivityResult.none, which can be surprising for some users. This PR add documentation to Connectivity class to specify this behavior.

Copy link
Member

@miquelbeltran miquelbeltran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This should be correct indeed. If an empty list is returned by mistake, that is clearly a bug.

As discussed, we can decide in the future if returning an empty array is better than returning an array with a single None element.

@miquelbeltran miquelbeltran merged commit 8f132a2 into fluttercommunity:main Mar 25, 2024
18 of 19 checks passed
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.

2 participants