Created
March 21, 2021 04:47
-
-
Save devjaime/222ae74db77dc153933aab0650fe770c to your computer and use it in GitHub Desktop.
Para ejecutar todos estos futuros al mismo tiempo, utilice Future.wait. Esto toma una lista o futuros y devuelve un futuro de listas
This file contains hidden or 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
| final api = CovidAPI(); | |
| final values = await Future.wait([ | |
| api.getCases(), | |
| api.getRecovered(), | |
| api.getDeaths(), | |
| ]); | |
| print(values); // [1000, 100, 10] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment