import ‘dart:io’; sleep(Duration(seconds:1)); Note: This blocks the entire process (isolate), so other async functions will not be processed.
Read moreWhat is an event loop in Dart?
Dart’s event loop and queues A Dart app has a single event loop with two queues—the event queue and the microtask queue. The event queue contains all outside events : I/O, mouse events, drawing events, timers, messages between Dart isolates, and so on.
Read more