I need to list all images from a specific directory in Firebase Storage. This solution shows how listAll() works https://stackoverflow.com/a/58430817/13720706
But if I use this:
void getFirebaseImageFolder() {
final StorageReference storageRef =
FirebaseStorage.instance.ref().child('Gallery').child('Images');
storageRef.listAll().then((result) {
print("result is $result");
});
}
I get a long string with many values:
result is {prefixes: {}, pageToken: null, items: {2020-06-2816:15:51.669533_250x250.jpg: {bucket: xxxxxxxxxxx.appspot.com, path: /userStorage/xxxxxxxxxxx/k6ouUrjUhMXJjDButEtF/L8H5IVSVhUKPLaGFLBaK/3VfcLmjR8ojxzPCboM9U/thumbs/2020-06-2816:15:51.669533_250x250.jpg, name: 2020-06-2816:15:51.669533_250x250.jpg}, 2020-06-2816:14:31.223608_250x250.jpg: {bucket: xxxxxxxxxxx.appspot.com, path: /userStorage/xxxxxxxxxxx/k6ouUrjUhMXJjDButEtF/L8H5IVSVhUKPLaGFLBaK/3VfcLmjR8ojxzPCboM9U/thumbs/2020-06-2816:14:31.223608_250x250.jpg, name: 2020-06-2816:14:31.223608_250x250.jpg}}}
So the question is how can I tap into this values? How can I get only the path of the images?
I tried this: result.items.path But it does not recognize this command.
Somebody knows how to list the images?
Thanks