sort_constructors_first

Group: style

Maturity: stable

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

Since info is static, may be stale
has-fix

View all Lint Rules

Using the Linter

DO sort constructor declarations before other members.

BAD:

abstract class Visitor {
  double value;
  visitSomething(Something s);
  Visitor();
}

GOOD:

abstract class Animation<T> {
  const Animation(this.value);
  double value;
  void addListener(VoidCallback listener);
}