unnecessary_const

Group: style

Maturity: stable

Dart SDK: >= 2.0.0 • (Linter v0.1.54)

View the Project on GitHub dart-lang/linter

AVOID repeating const keyword in a const context.

BAD:

class A() { const A(); }
m(){
  const a = const A();
  final b = const [const A()];
}

GOOD:

class A() { const A(); }
m(){
  const a = A();
  final b = const [A()];
}