prefer_if_null_operators

Group: style

Maturity: stable

Dart SDK: >= 2.3.2-dev.0.0 • (Linter v0.1.89)

Since info is static, may be stale
pedantic

View all Lint Rules

Using the Linter

Prefer using if null operators instead of null checks in conditional expressions.

BAD:

v = a == null ? b : a;

GOOD:

v = a ?? b;