delay method

Future<void> delay([
  1. FutureOr<void> callback()?
])

Creates a Future that completes after this duration. An optional callback can be executed when the future completes.

Implementation

Future<void> delay([FutureOr<void> Function()? callback]) async =>
    Future.delayed(this, callback);