On this page
sleep function
void sleep(Sleep for the duration specified in duration
.
Use this with care, as no asynchronous operations can be processed in a isolate while it is blocked in a sleep call.
Source
void sleep(Duration duration) {
int milliseconds = duration.inMilliseconds;
if (milliseconds < 0) {
throw new ArgumentError("sleep: duration cannot be negative");
}
_ProcessUtils._sleep(milliseconds);
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-io/sleep.html