-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[connectivity][connectvity_platform_interface] migrate to nnbd #3176
Changes from 8 commits
13be3c7
382a3cb
12ead11
a552dba
23411ec
bb6c42d
ec3eca9
571ab84
2a449ae
fa39e74
cdd4250
09f8edf
3a0ad7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| include: ../../../analysis_options.yaml | ||
| analyzer: | ||
| enable-experiment: | ||
| - non-nullable |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ## 1.1.0-nullsafety | ||
|
||
|
|
||
| * Migrate to null safety. | ||
|
|
||
| ## 1.0.6 | ||
|
|
||
| * Update lower bound of dart dependency to 2.1.0. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| include: ../../../analysis_options.yaml | ||
| analyzer: | ||
| enable-experiment: | ||
| - non-nullable |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import 'package:connectivity_platform_interface/connectivity_platform_interface.dart'; | ||
|
|
||
| /// Convert a String to a ConnectivityResult value. | ||
| ConnectivityResult parseConnectivityResult(String state) { | ||
| ConnectivityResult parseConnectivityResult(String? state) { | ||
|
||
| switch (state) { | ||
| case 'wifi': | ||
| return ConnectivityResult.wifi; | ||
|
|
@@ -14,7 +14,7 @@ ConnectivityResult parseConnectivityResult(String state) { | |
| } | ||
|
|
||
| /// Convert a String to a LocationAuthorizationStatus value. | ||
| LocationAuthorizationStatus parseLocationAuthorizationStatus(String result) { | ||
| LocationAuthorizationStatus parseLocationAuthorizationStatus(String? result) { | ||
|
||
| switch (result) { | ||
| case 'notDetermined': | ||
| return LocationAuthorizationStatus.notDetermined; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. In some cases the analyzer is smart enough to figure out that
_singletoncannot benullat this point, so!isn't required.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got an error trying to remove !