flatMapAsync<R> abstract method
FutureOr<Result<R> >
flatMapAsync<R>(
- Future<
R> onSuccess(- T value
- ExceptionHandler? exceptionHandler,
- String? errorGroup,
Similar to flatMap, but for asynchronous operations. Maps a Result<T> to FutureOr<Result<R>>.
onSuccess
is the function that asynchronously transforms the value if the result is a success.
exceptionHandler
is an optional handler for any exceptions thrown during the transformation.
errorGroup
is an optional group identifier for the error.
Implementation
FutureOr<Result<R>> flatMapAsync<R>(
Future<R> Function(T value) onSuccess, {
ExceptionHandler? exceptionHandler,
String? errorGroup,
});