Dart Analyze logoDart Analyze/
DRT-W1064

Don't rename parameters of overridden methodsDRT-W1064

Major severityMajor
Anti-pattern categoryAnti-pattern

DON'T rename parameters of overridden methods.

Methods that override another method, but do not have their own documentation comment, will inherit the overridden method's comment when dart doc produces documentation. If the inherited method contains the name of the parameter (in square brackets), then dart doc cannot link it correctly.

BAD:

abstract class A {
  m(a);
}

abstract class B extends A {
  m(b);
}

GOOD:

abstract class A {
  m(a);
}

abstract class B extends A {
  m(a);
}