fold<T> abstract method
T
fold<T>(
- T onSuccess(
- S value
- T onFailure(
- F error
Fold the result into a single value
Calls onSuccess if this is a Success, onFailure if this is a Failure.
Implementation
T fold<T>(T Function(S value) onSuccess, T Function(F error) onFailure);