unnecessary_const

Group: style

Maturity: stable

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

Since info is static, may be stale
pedanticeffective dart

View all Lint Rules

Using the 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()];
}