orElseGeAsync method

Future<T> orElseGeAsync(
  1. FutureOr<T> defaultGetter()
)

Returns the value of this Future (T). If the value is null, it will return the value returned by defaultGetter.

Implementation

Future<T> orElseGeAsync(FutureOr<T> Function() defaultGetter) =>
    then((value) => value ?? defaultGetter());