Pattern: Missing use of null-aware method call
Issue: -
Instead of checking nullability of a function/method f
before calling it you can use f?.call()
.
Example of incorrect code:
if (f != null) f!();
Example of correct code:
f?.call();
Pattern: Missing use of null-aware method call
Issue: -
Instead of checking nullability of a function/method f
before calling it you can use f?.call()
.
Example of incorrect code:
if (f != null) f!();
Example of correct code:
f?.call();