-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Remove new
keyword in a few files
#104438
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
Remove new
keyword in a few files
#104438
Conversation
const String _kColorForegroundWarning = 'Cannot provide both a color and a foreground\n' | ||
'The color argument is just a shorthand for "foreground: new Paint()..color = color".'; | ||
'The color argument is just a shorthand for "foreground: Paint()..color = color".'; | ||
|
||
const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor and a background\n' | ||
'The backgroundColor argument is just a shorthand for "background: new Paint()..color = color".'; | ||
'The backgroundColor argument is just a shorthand for "background: Paint()..color = color".'; |
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.
Should I add tests for this?
Ideally, we'd wrap the code samples in |
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
Thanks for the clean-up.
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!
What is with the files in the description?
Should I open new a PR and you just say if removing the |
Those look fine to me, I do not think they need to be changed. Thanks! |
CI is pending on your PR because there were problems upstream on master at the time you branched. If you rebase upstream, CI will re-run and checks should pass. Sorry about the trouble and thanks for contributing! |
This pull request is not suitable for automatic merging in its current state.
|
There were files with the old keyword.
Wrote @Hixie in https://github.com/flutter/flutter/pull/69507/files#r519475809
Therefore, I tried to find all old
new
keywords. I think I fixed them all. But there are still some that I wasn't sure were on purpose there:Fixes #104436
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.