unnecessary_overrides

Group: style

Maturity: stable

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

Since info is static, may be stale
corerecommendedflutterhas-fix

View all Lint Rules

Using the Linter

DON'T override a method to do a super method invocation with same parameters.

BAD:

class A extends B {
  @override
  void foo() {
    super.foo();
  }
}

GOOD:

class A extends B {
  @override
  void foo() {
    doSomethingElse();
  }
}

It's valid to override a member in the following cases:

noSuchMethod is a special method and is not checked by this rule.