firebase - Firebase cloudstore在flutter中获取文档中的所有集合
问题描述
当我不知道集合的名称时,我将获取文档中的所有集合,如何获取文档中的所有集合
await FirebaseFirestore.instance
.collection('answers')
.doc('vS55vOUPtNXaRY06IXIPq6V9ss73')
.collection('uu')
.get()
.then((querySnapshot) {
}).catchError((e){
});
Doument "vS55vOUPtNXaRY06IXIPq6V9ss73" 有 2 个集合,"uu" 和 "uy"。这是动态的。
解决方案
Firestore.instance.collection("answers").snapshots
这可用于检索 firestore 中的所有文档
推荐阅读
- matlab - matlab指南,缩放时发出事件(或信号)
- javascript - 滚动到Vue中模态窗口的底部
- laravel-5 - 在单个 vue 组件中包含本地 CSS 文件
- c# - C# OData 开放类型序列化
- ios - 在两个同时显示的视图控制器之间传递数据的最简单方法是什么?
- php - 电话访问计数代替评论
- javascript - Javascript按顺序打印到文件
- java - 尝试在 websphere 8.5.5.13 上部署 ear 时出现 AnnotationException?
- xamarin - 在 xamarin 工作室中找不到配置文件,在 xcode 中找到
- javascript - 流式'keydown'事件