forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[connectivity_platform_interface] Add
ConnectivityResult.unknown
. (f…
…lutter#2560) Some platforms might not be able to determine the connectivity status of the device on which the app is running (like some desktop Web browsers). This allows users of the `connectivity` plugin to distinguish between "no connectivity" and "connectivity couldn't be determined". This requires a Major Version bump for users of the plugin who may be switch/case on ConnectivityResult values, since Dart forces users to be exhaustive in those cases (if they don't have a "default" entry, this new value becomes a compilation error in their code). This will also cause a Major Version bump in the core `connectivity` plugin itself. Note that by default, the ConnectivityResults returned by the MethodChannel implementation will now default to 'unknown' if they're not explicitly "none", so this might have some effect in your code!
- Loading branch information
Showing
4 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/connectivity/connectivity_platform_interface/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters