I want to retrieve data of an array that stores url's and place them, each one, in an item in a list. In my example, all url's are stored in the first item. Is there a way to manipulate the field indexes todo this? [https://i.stack.imgur.com/KnIF6.png][1]. Here's my code:
Future<void> getImages() async {
int i = 0;
listImgs = List(4);
await firestoreInstance
.collection('dados_inst')
.where('cod_inst', isEqualTo: codInst)
.get()
.then((value) {
value.docs.forEach((snapshot) {
listImgs[i++] = snapshot.get('list_view');
});
});
for (i = 0; i < 4; i++) {
print(listImgs[i]);
}
}