📅  最后修改于: 2022-03-11 14:56:43.048000             🧑  作者: Mango
final String _collection = 'collectionName';
final Firestore _fireStore = Firestore.instance;
getData() async {
return await _fireStore.collection(_collection).getDocuments();
}
getData().then((val){
if(val.documents.length > 0){
print(val.documents[0].data["field"]);
}
else{
print("Not Found");
}
});