Pattern: Use of redundant argument value
Issue: -
Avoid redundant argument values.
DON'T declare arguments with values that match the defaults for the corresponding parameter.
Example of incorrect code:
void f({bool valWithDefault = true, bool val}) {
...
}
void main() {
f(valWithDefault: true);
}
Example of correct code:
void f({bool valWithDefault = true, bool val}) {
...
}
void main() {
f(valWithDefault: false);
f();
}