I like to simulate an asynchronous web service call in my Dart application for testing. To simulate the randomness of these mock calls responding (possibly out of order) I\
It's not always what you want (sometimes you want Future.delayed), but if you really want to sleep in your Dart command-line app, you can use dart:io's sleep():