Skip to content
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

Find and replace all "new " for "" #39

Closed
GustavoContreiras opened this issue Mar 31, 2019 · 0 comments
Closed

Find and replace all "new " for "" #39

GustavoContreiras opened this issue Mar 31, 2019 · 0 comments

Comments

@GustavoContreiras
Copy link
Contributor

Dart 2 makes the new keyword optional. Even in Dart 1, its meaning was never clear because factory constructors mean a new invocation may still not actually return a new object.

The language still permits new in order to make migration less painful, but consider it deprecated and remove it from your code.

https://dart-lang.github.io/linter/lints/unnecessary_new.html
https://www.dartlang.org/guides/language/effective-dart/usage#dont-use-new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant