📌  相关文章
📜  flutter firestore 获取文档字段 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:43.048000             🧑  作者: Mango

代码示例1
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");
    }
});