FutureExtensions<T> extension

Extensions for Future operations and utilities.

on

Methods

orElse(T fallback) Future<T>

Available on Future<T>, provided by the FutureExtensions extension

Completes with fallback if this future throws.
orElseGet(T fallback(Object error)) Future<T>

Available on Future<T>, provided by the FutureExtensions extension

Completes with the result of fallback if this future throws.
orNull() Future<T?>

Available on Future<T>, provided by the FutureExtensions extension

Returns the result, or null if this future throws.
thenDelay(Duration duration) Future<T>

Available on Future<T>, provided by the FutureExtensions extension

Waits for this future, then delays for duration before returning.