-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Begin migrating tools to NNBD #3891
Begin migrating tools to NNBD #3891
Conversation
| platform == kWindows || | ||
| platform == kLinux); | ||
| if (entity == null || entity is! Directory) { | ||
| if (entity is! Directory) { |
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.
I think we can remove this since it is done in the very beginning of the method?
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.
This is the very beginning of the method :)
script/tool/lib/src/common.dart
Outdated
| /// Get the package version on pub. | ||
| Future<PubVersionFinderResponse> getPackageVersion( | ||
| {@required String package}) async { | ||
| {required String? package}) async { |
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.
can be required String package and remove the below assert for != null
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.
Done.
cyanglaz
left a comment
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.
LGTM
- Updates dependencies to null-safe versions - Migrates common.dart (which doesn't depend on anything) - Migrates common_tests.dart and its one dependency, utils.dart - Adds build_runner for Mockito mock generation - Adds a new utility methods for getting arguments that handle both the casting and the removal of nullability to address a common problematic pattern while migrating code. - Converts all files, not just the migrated ones, to those new helpers. Migrating common.dart and utils.dart should unblock a command-by-command migration to null safety. Reverts the separate of podspect lints into a step that doesn't do a Flutter upgrade (flutter#3700) because without that step we had a version of Dart too old to run null-safe tooling. First step of flutter/flutter#81912
Migrating common.dart and utils.dart should unblock a command-by-command migration to null safety.
Reverts the separate of podspect lints into a step that doesn't do a Flutter upgrade
(#3700) because without that step we had a
version of Dart too old to run null-safe tooling.
First step of flutter/flutter#81912
Pre-launch Checklist
dart format. See plugin_tool format)[shared_preferences]///).