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.
Should I add tests for this?
|
Ideally, we'd wrap the code samples in |
goderbauer
left a comment
There was a problem hiding this comment.
LGTM
Thanks for the clean-up.
|
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
newkeywords. 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.