OptionMapFilterAsyncX<T> extension
Collection of method for async map and filter in a Option
Methods
-
filterAsync(
FutureOr< bool> predicate(T)) → Future<Option< T> > -
Available on FutureOr<
Returns None if the option is None, otherwise callsOption< , provided by the OptionMapFilterAsyncX extensionT> >predicate
with the wrapped value and returns: -
mapAsync<
U> (FutureOr< U> op(T)) → Future<Option< U> > -
Available on FutureOr<
Maps anOption< , provided by the OptionMapFilterAsyncX extensionT> >Option<T>
toOption<U>
by applying an asynchronous function to a contained Some value. Otherwise returns a None. -
mapOrAsync<
U> (FutureOr< U> op(T), U opt) → Future<U> -
Available on FutureOr<
Applies an asynchronous function to the contained value (if any), or returns the provided default (if not).Option< , provided by the OptionMapFilterAsyncX extensionT> > -
mapOrElseAsync<
U> (FutureOr< U> op(T), FutureOr<U> def()) → Future<U> -
Available on FutureOr<
Maps anOption< , provided by the OptionMapFilterAsyncX extensionT> >Option<T>
toU
by applying an asynchronous function to a containedT
value, or computes a default (if not).