LetExtension<T extends Object> extension
Extension for transforming values using a block function.
This extension provides functional transformation capabilities, similar to map/flatMap patterns from functional programming. Useful for chaining transformations in a readable way.
Example:
final doubled = 5
.let((n) => n * 2)
.let((n) => '$n is the result');
- on
-
- T
Methods
-
let<
R extends Object?> (R block(T value)) → R -
Available on T, provided by the LetExtension extension
Transforms this value usingblockand returns the result.