thenOr<R extends Object?> method

FutureOr<R> thenOr<R extends Object?>(
  1. TSyncOrAsyncMapper<T, R> callback, {
  2. void onError(
    1. Object e
    )?,
})

Maps a synchronous or asynchronous value to another.

Implementation

FutureOr<R> thenOr<R extends Object?>(
  TSyncOrAsyncMapper<T, R> callback, {
  void Function(Object e)? onError,
}) {
  return mapSyncOrAsync<T, R>(
    this,
    callback,
    onError: onError,
  );
}