Async and Await in Dart
void main() {
var testAsync = TestAsync();
testAsync.printWithDelay("Hello Async Dart!");
}
class TestAsync {
static const fiveSecond = Duration(seconds: 5);
Future<void> printWithDelay(String message) async {
await Future.delayed(fiveSecond);
print(message);
}
}