Group: style
Maturity: deprecated
Dart SDK: >= 2.0.0 • (Linter v0.1.31)
Since info is static, may be staleDO specify @required
on named parameters without a default value on which
an assert(param != null)
is done.
BAD:
m1({a}) {
assert(a != null);
}
GOOD:
m1({@required a}) {
assert(a != null);
}
m2({a: 1}) {
assert(a != null);
}
NOTE: Only asserts at the start of the bodies will be taken into account.