【发布时间】:2026-02-04 23:10:01
【问题描述】:
有什么方法可以使用 Flutter 从 Firebase Firestore 中检索集合及其子集合?
fetchTestSite() async {
return await FirebaseFirestore.instance
.collection('sites')
.doc('4R3aOMBFTjumYCbETDU8')
.get()
.then((DocumentSnapshot doc) {
print('document: ${doc.data()}');
});
}
这段代码sn-p只返回主集合,没有现有的子集合
【问题讨论】:
标签: firebase flutter dart google-cloud-firestore