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

Migrate persistent_tool_state to null safety #80085

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 3 commits into from
Apr 9, 2021

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
Comment on lines 103 to 105
final String? versionKey = _versionKeyFor(channel);
assert(versionKey != null);
return _config.getValue(versionKey) as String;
return _config.getValue(versionKey!) as String?;
Copy link
Member Author

Choose a reason for hiding this comment

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

Is there any way to mark that the getter returns a nullable but the setter requires a nonnull value?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that sort of thing is frowned upon.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was frowning the whole time.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now the getters and setters are named something slightly different.

@jmagman jmagman requested a review from jonahwilliams April 8, 2021 23:22
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot fluttergithubbot merged commit 4a73050 into flutter:master Apr 9, 2021
@jmagman jmagman deleted the null-persistent-ts branch April 9, 2021 02:14
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