mapOr<U> method

Future<U> mapOr<U>(
  1. U defaultValue,
  2. U f(
    1. T
    )
)

Implementation

@pragma("vm:prefer-inline")
Future<U> mapOr<U>(U defaultValue, U Function(T) f) {
  return then((option) => option.isSome() ? f(option as T) : defaultValue);
}