avoid_redundant_argument_values

Group: style

Maturity: stable

Linter v0.1.107

Since info is static, may be stale

View all Lint Rules

Using the Linter

Avoid redundant argument values.

DON'T declare arguments with values that match the defaults for the corresponding parameter.

BAD:

void f({bool valWithDefault = true, bool val}) {
  ...
}

void main() {
  f(valWithDefault: true);
}

GOOD:

void f({bool valWithDefault = true, bool val}) {
  ...
}

void main() {
  f(valWithDefault: false);
  f();
}