asyncMapResult<T> method
Map the current Result
stream to a new Result
one,
which could be from a different type.
Use the mapSuccess
callback to map the success from the current stream
to the result stream in an async manner.
Example:
Result<String> result = Stream.value(Result.success(10))
.asyncMapResult((value) async => value * 10)
.asyncMapResult((value) async => value.toString()); // Result.success('100')
Implementation
Stream<Result<T>> asyncMapResult<T>(
Future<T> Function(E) mapSuccess, {
String? tag,
}) =>
asyncMap(
(result) => result.asyncMapResult(mapSuccess, tag: tag),
);