prefer_null_aware_method_calls

Group: style

Maturity: stable

Linter vnull

Since info is static, may be stale

View all Lint Rules

Using the Linter

Instead of checking nullability of a function/method f before calling it you can use f?.call().

BAD:

if (f != null) f!();

GOOD:

f?.call();