According to the documentation you can do something like this:
db.collection("cities").get().then(function(querySnapshot) {
querySnapshot.forEach(function(doc) {
console.log(doc.id, " => ", doc.data());
});
});
The flutter example does this
children: snapshot.data.documents.map((document) {
return new ListTile(
title: new Text(document['title']),
subtitle: new Text(document['author']),
);
This is almost the same, but with flutter you already have the data of the document. The FireStore plugin should also expose the document ID.
what's the solution?
Most helpful comment
what's the solution?