Skip to content

Instantly share code, notes, and snippets.

View nythrox's full-sized avatar
🌊

Jason Butler nythrox

🌊
View GitHub Profile
@nythrox
nythrox / do_notation_future.dart
Last active January 23, 2023 06:23
Dart await/async using Future and do notation
main() {
final value = async(() {
final num1 = await(Future.value(5));
final num2 = await(Future.value(2));
return num1 * num2;
});
value.then(print).catchError(print);
async(() {
[1,2,3,4,5].forEach((i) {