【发布时间】:2021-06-17 01:32:43
【问题描述】:
我在 Firestore 中存储了 Withdrawals,但每个文档都有一个文档集合。我想获取所有文档和每个文档集合。
Firestore 数据库结构:
我尝试了很多方法,但都不适合我。我还附上了我的数据库的照片
我的代码:
FirebaseFirestore.instance.collection('withdrawals').get().then((value) {
print(value.docs.length);
});
我的提款集合中有 2 个文档,但它返回 0。
当我尝试获取特定文档集合时,它可以正常工作并完美返回数据。
【问题讨论】:
标签: flutter google-cloud-firestore flutter-dependencies