Flutter Dev’s Post

View organization page for Flutter Dev, graphic

67,559 followers

Instead of waiting for the sum of the wait times across all of the futures, only wait for the longest future! 🔮 On this #TechniqueOfTheWeek, learn how to use Future.wait() to wait for multiple futures to complete and collect their results. → https://goo.gle/3W9MD3q

  • YouTube thumbnail with the title text "Technique of the Week: Future.wait"
Gildásio Filho

Mobile Software Engineer @ Indaband

2w

There's also the .wait extension method if you need different types! You can do it like this to have the values separately instead of a list of values of the same type. final (value1, value2) = await (future1, future2).wait;

Leif Linse

Systemutvecklare på Trivector Traffic, System architect på EC2B

1w

One important thing to note is that the signature of the exceptions to catch changes as you will get a collection of exceptions and cannot just catch one of the individual exceptions directly as with a usual await.

Like
Reply
João Victor Schramm

Mobile Engineer | Mobile Developer | Flutter | Dart

5d

Parallelism 👌🏾

Like
Reply
Paulino Fonseca

Mobile | Flutter Dev | Full Stack | PHP Laravel | IT Suport | Cybersecurity

2w

Thanks for sharing

Satyendra Bongi

Full-Stack Developer | IIIT Kota'26 | Empowering Digital Solutions | Code Craftsman | Tech Explorer

2w

Thankyou so much 🥰

Wojciech Madeja

Dart Developer / Flutter Developer /FlutterFlow Developer

2w

Good to know! Thanks!

Innocent Diwe

SDG Advocate | Software developer | Dart | Flutter | React. Creating amazing applications.

2w

Very helpful!.

See more comments

To view or add a comment, sign in

Explore topics