mapSuccess<K> method
A method used to chain access to data held by the Result. If this
is Failure returns Failure, if this
is Success, returns the result of the combiner
method over the data
inside Success
Implementation
// ignore: empty_constructor_bodies
Result<K> mapSuccess<K>(
Result<K> Function(ResultType) combiner,
) {
return handle(
onSuccess: (data) => combiner(data),
onFailure: (error) => Failure(error));
}