I have a list which looks something like this:

indices = [ image_02, image_32, image_33 ]

I am using flutter_secure_storage package to store data such that every element in the above list has some data stored like this:

image_02 : 
        image: "http://path//to//image//",
        link: "http://links//to//webpage//"

To access the data I use:

var image_data = await storage.read(key: 'image_02');

Using this method, I can get the data stored in 'image_02' in the secure_storage. However, I have over a few hundred data like this. Which is why, I have a list of indices that maintains a list of keys to access the stored data.

Now, I used for loop to iterate through the list like this:

for (var index in list) {
      var data = await storage.read(key: index);

But the for loop only returns the first data. All the other results are null:

I/flutter (15384): {image: https://xxxxxxxxxxx.com/api/upload/image_slider/f323694602724b675a898ba0454561ee.png, link: https://www.xxxxxxx.com/watch?v=xxxxxxxxxxx}
I/flutter (15384): null
I/chatty  (15384): uid=11004(com.xxxxxx.xxxxxx) Thread-3 identical 5 lines
I/flutter (15384): null

For now, I am working on test server, which has around 6 - 7 images. Is there any way to loop through a list and get data from a function that returns a future?