let<R> method
R?
let<R>(
- R block(
- T it
Executes block if value is not null and returns the result Usage: user?.let((it) => it.name) ?? 'Guest'
Implementation
R? let<R>(R Function(T it) block) {
final self = this;
if (self != null) return block(self);
return null;
}