mapValue<R> method
Note: block
should be a pure function, since it may be called multiple times.
Implementation
ComputedStateValue<R> mapValue<R>(R Function(T) block) {
return when(
notInitialized: () => ComputedStateValue.notInitialized,
inProgress: (operation) => ComputedStateValue.inProgress(operation.then(block)),
ready: (value) => ComputedStateValue.ready(block(value)),
failed: ComputedStateValue.failed,
);
}