Migrate the tests of flutter_test to null-safety #67058
Merged
Conversation
goderbauer
reviewed
Oct 1, 2020
|
|
||
| void main() { | ||
| test('$WidgetsBinding initializes with $AutomatedTestWidgetsFlutterBinding when FLUTTER_TEST is defined but null', () { | ||
| TestWidgetsFlutterBinding.ensureInitialized(<String, String>{'FLUTTER_TEST': null}); |
This test is deleted because the type system now grantees that null can never be passed in as a value.
dnfield
approved these changes
Oct 1, 2020
LGTM with some whitespace nits
| return Container( | ||
| padding: const EdgeInsets.all(8.0), | ||
| color: background, | ||
| child: Icon(icon, color: color), | ||
| ); | ||
| } | ||
|
|
||
| Widget _text ({String text = 'Text', Color color, Color background}) { | ||
| Widget _text ({String text = 'Text', required Color color, required Color background}) { |
Suggested change
| Widget _text ({String text = 'Text', required Color color, required Color background}) { | |
| Widget _text({String text = 'Text', required Color color, required Color background}) { |
| _icon (color: Colors.white, background: Colors.red[800]!, icon: Icons.more_horiz), | ||
| _icon (color: Colors.white, background: Colors.green[800]!, icon: Icons.description), | ||
| _icon (color: Colors.white, background: Colors.blue[800]!, icon: Icons.image), | ||
| _icon (color: Colors.white, background: Colors.purple[800]!, icon: Icons.beach_access), |
Suggested change
| _icon (color: Colors.white, background: Colors.red[800]!, icon: Icons.more_horiz), | |
| _icon (color: Colors.white, background: Colors.green[800]!, icon: Icons.description), | |
| _icon (color: Colors.white, background: Colors.blue[800]!, icon: Icons.image), | |
| _icon (color: Colors.white, background: Colors.purple[800]!, icon: Icons.beach_access), | |
| _icon(color: Colors.white, background: Colors.red[800]!, icon: Icons.more_horiz), | |
| _icon(color: Colors.white, background: Colors.green[800]!, icon: Icons.description), | |
| _icon(color: Colors.white, background: Colors.blue[800]!, icon: Icons.image), | |
| _icon(color: Colors.white, background: Colors.purple[800]!, icon: Icons.beach_access), |
| _icon (color: Colors.white, background: Colors.red[200]!, icon: Icons.more_horiz), | ||
| _icon (color: Colors.white, background: Colors.green[400]!, icon: Icons.description), | ||
| _icon (color: Colors.white, background: Colors.blue[600]!, icon: Icons.image), | ||
| _icon (color: Colors.white, background: Colors.purple[800]!, icon: Icons.beach_access), |
Suggested change
| _icon (color: Colors.white, background: Colors.red[200]!, icon: Icons.more_horiz), | |
| _icon (color: Colors.white, background: Colors.green[400]!, icon: Icons.description), | |
| _icon (color: Colors.white, background: Colors.blue[600]!, icon: Icons.image), | |
| _icon (color: Colors.white, background: Colors.purple[800]!, icon: Icons.beach_access), | |
| _icon(color: Colors.white, background: Colors.red[200]!, icon: Icons.more_horiz), | |
| _icon(color: Colors.white, background: Colors.green[400]!, icon: Icons.description), | |
| _icon(color: Colors.white, background: Colors.blue[600]!, icon: Icons.image), | |
| _icon(color: Colors.white, background: Colors.purple[800]!, icon: Icons.beach_access), |
cba170f
into
flutter:master
33 checks passed
33 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Description
Migrates the tests of
flutter_testto null-safety. With that, the package is fully migrated.Related Issues
Follow-up to #53908.
Tests
The PR only contains tests.
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.
The text was updated successfully, but these errors were encountered: