-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Migrate template to null safety #80016
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
Conversation
packages/flutter_tools/lib/src/android/deferred_components_prebuild_validator.dart
Outdated
Show resolved
Hide resolved
if (language != match.group(2)) { | ||
return null; | ||
} | ||
relativeDestinationPath = relativeDestinationPath.replaceAll('$platform-$language.tmpl', platform); | ||
relativeDestinationPath = relativeDestinationPath.replaceAll('$platform-$language.tmpl', platform!); |
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.
Force unwrap platform
will crash if platform
is 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.
match.group(1)
can't be null if match
isn't null, it means there was at least one match. And it's 1 indexed.
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!
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 👍
Part of #71511