letOr<R> method
R
letOr<R>(
- R block(
- T it
- required R defaultValue,
Executes block when non-null, returning defaultValue if the receiver is null.
Unlike let, this always returns a non-null result.
Implementation
R letOr<R>(R Function(T it) block, {required R defaultValue}) =>
this == null ? defaultValue : block(this as T);