unnecessary_null_checks

Group: style

Maturity: experimental

Dart SDK: >= 2.10.0-144.0.dev • (Linter v0.1.119)

Since info is static, may be stale

View all Lint Rules

Using the Linter

Don't apply a null check when a nullable value is accepted.

BAD:

f(int? i);
m() {
  int? j;
  f(j!);
}

GOOD:

f(int? i);
m() {
  int? j;
  f(j);
}