delay property

Future<void> get delay

Returns a Future that completes after this duration.

Example:

await 5.seconds.delay;
print('5 seconds gone'); // printed after 5 seconds

Implementation

Future<void> get delay => Future.delayed(this);