Skip to content

Instantly share code, notes, and snippets.

View sdurban's full-sized avatar
🎣
Working from home

Sergio Durban Belmonte sdurban

🎣
Working from home
  • LeadTech
  • Barcelona, Spain
  • 03:32 (UTC +02:00)
View GitHub Profile
@sdurban
sdurban / main.dart
Created April 8, 2021 06:20
Event loop example
Future<void> printOrderMessage() async {
print('Awaiting user order...');
var order = await fetchUserOrder();
print('Your order is: $order');
}
Future<String> fetchUserOrder() {
return Future.delayed(Duration(seconds: 3), () => 'Large Latte');
}