sleep in dart code example
Example 1: flutter sleep
await Future.delayed(const Duration(seconds: 1));
sleep(const Duration(seconds: 1));
Example 2: sleep in dart
import 'dart:io';
main() {
sleep(const Duration(seconds:1));
}
Example 3: thread sleep daret
sleep(const Duration(seconds: 5));