Is there a way to convert Future> to List?
Edit: Home Page - I'm fetching a list of strings from my firebase collection. I then want to make a call to firestore storage and get the downloadable image link and store it in a list that I will pass to Page 2. The code below is how i'm getting the downloadable links. Future<List<String>> test(List images) async{ List<String> listOfImages = List<String>(); for(int i = 0; i < images.length; i++){ final ref = FirebaseStorage.instance.ref().child(images[i]); var url = await ref.getDownloadURL(); listOfImages.add(url); } return listOfImages; } I'm then passing the list of Images in the following
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.