Last active
August 30, 2019 04:31
-
-
Save Dalmangyi/7eb3560e231a076712a65229b18aa656 to your computer and use it in GitHub Desktop.
Dart Async Await Exam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
int a = 0; | |
void main() async { | |
print('first'); | |
func(); | |
print('second'); | |
await func(); | |
print('third'); | |
} | |
void func() async { | |
await Future.delayed(Duration(milliseconds:1500), ()=> print('--async-- : ${a++}')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment