In Dart language there’s a new
keyword. It is used with class constructors to create new instances. Since Dart 2.0 the
new
keyword is optional and can be omitted. As this keyword doesn’t bring any additional value, it is recommended to avoid using it.
By removing unnecessary new
, you’ll reduce the cognitive load and make code more readable and concise. Another effect of such change
is that it makes easier the switch to const constructors, since they can’t be invoked with the new
keyword.