deprecated_consistency

Group: style

Maturity: stable

Linter vnull

Since info is static, may be stale

View all Lint Rules

Using the Linter

Do apply @Deprecated() consistently:

BAD:

@deprecated
class A {
  A();
}

class B {
  B({this.field});
  @deprecated
  Object field;
}

GOOD:

@deprecated
class A {
  @deprecated
  A();
}

class B {
  B({@deprecated this.field});
  @deprecated
  Object field;
}