Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Created April 10, 2020 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McLarenCollege/e9666e61375e051ea282576bd906619a to your computer and use it in GitHub Desktop.
Save McLarenCollege/e9666e61375e051ea282576bd906619a to your computer and use it in GitHub Desktop.

This code is not working as expected. Explain why.

List<String> getAll(List<String> urls) {
  List<String> results = [];
  urls.forEach((String url) async {
    var result = await get(url);
    results.add(result.body);
  });
  return results;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment