How do I return a QuerySnapshot as a Future >> ?
Code snippet:
Future <List<Map<dynamic, dynamic>>>() {
List<Map<dynamic,dynamic>> list;
.....
.....
QuerySnapshot collectionSnapshot = await collectionRef.getDocuments();
list = collectionSnapshot.documents; <--- ERROR
return list;
}
I think I need to use a Map of but couldn't get around it to work.