orElseAsync method

Future<T> orElseAsync(
  1. T defaultValue
)

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

Implementation

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