Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. void main() async {
  2. final a = Future.delayed(const Duration(seconds: 1));
  3. final b = Future.error(2);
  4. try {
  5. await Future.wait([a, b]); // Warn uncatched error if remove this line.
  6. await a;
  7. await b;
  8. } catch (e) {
  9. print(e);
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement