delay<A> function

Task<A> Function(Task<A> task) delay<A>(
  1. Duration d
)

Pause execution of the task by the given Duration.

Implementation

Task<A> Function(Task<A> task) delay<A>(Duration d) =>
    (task) => Task(() => Future.delayed(d, task));