delay function

Future<void> delay()

Introduces a delay of 1 second.

This utility can be used in asynchronous workflows where a slight delay is needed.

Implementation

Future<void> delay() async {
  await Future.delayed(const Duration(seconds: 1));
}