orElseAsync method

FutureOr<T> orElseAsync(
  1. T defaultValue
)

Returns the value of this FutureOr (T). If the value is null, it will return the defaultValue.

Implementation

FutureOr<T> orElseAsync(T defaultValue) =>
    then((value) => value ?? defaultValue);