Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main() async {
- final a = Future.delayed(const Duration(seconds: 1));
- final b = Future.error(2);
- try {
- await Future.wait([a, b]); // Warn uncatched error if remove this line.
- await a;
- await b;
- } catch (e) {
- print(e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment