future delayed 2 seconds code example Example: sleep in dart import 'dart:io'; main() { sleep(const Duration(seconds:1)); }