type_init_formals

Group: style

Maturity: stable

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

flutter

View the Project on GitHub dart-lang/linter

From the style guide:

DON'T type annotate initializing formals.

If a constructor parameter is using this.x to initialize a field, then the type of the parameter is understood to be the same type as the field.

GOOD:

class Point {
  int x, y;
  Point(this.x, this.y);
}

BAD:

class Point {
  int x, y;
  Point(int this.x, int this.y);
}