thenDelay method

Future<T> thenDelay(
  1. Duration duration
)

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

Example:

await submit().thenDelay(const Duration(seconds: 1));

Implementation

Future<T> thenDelay(Duration duration) =>
    then((T value) => Future<T>.delayed(duration, () => value));