letNullable<R> method
R?
letNullable<R>(
- R? block(
- T? it
Backwards-compatible variant that passes the nullable receiver to block.
Prefer let for cleaner null handling.
Implementation
R? letNullable<R>(R? Function(T? it) block) =>
this == null ? null : block(this);