这是indexloc提供的服务,不要输入任何密码
Skip to content

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

Merged
merged 2 commits into from
Apr 8, 2021
Merged

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Apr 8, 2021

Part of #71511

@jmagman jmagman added c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. a: null-safety Support for Dart's null safety feature labels Apr 8, 2021
@jmagman jmagman self-assigned this Apr 8, 2021
@google-cla google-cla bot added the cla: yes label Apr 8, 2021
@jmagman jmagman requested a review from cyanglaz April 8, 2021 05:56
if (language != match.group(2)) {
return null;
}
relativeDestinationPath = relativeDestinationPath.replaceAll('$platform-$language.tmpl', platform);
relativeDestinationPath = relativeDestinationPath.replaceAll('$platform-$language.tmpl', platform!);
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@campovski campovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@jmagman jmagman merged commit beec610 into flutter:master Apr 8, 2021
@jmagman jmagman deleted the null-template branch April 8, 2021 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: null-safety Support for Dart's null safety feature c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants