[英]How can i retrieve documents from the firebase when i press on a certain button?
I'm new to flutter development so this might be basic knowledge to you.我是 flutter 开发的新手,所以这可能是您的基本知识。 I have this application where I need the user to choose a retrieved tags from the database when they post
我有这个应用程序,我需要用户在发布时从数据库中选择检索到的标签
this is the tags I want to list them to the users where they can checkbox their desired tags firebase collections这是我想将它们列出给用户的标签,他们可以在其中勾选他们想要的标签
I tried to watch videos and read docs but there is always an error and I don't know what is the right way to do it我尝试观看视频和阅读文档,但总是出现错误,我不知道正确的方法是什么
You can get all documents in a collection by calling FirebaseFirestore.instance.collection(YOUR_ID).snapshots()
您可以通过调用
FirebaseFirestore.instance.collection(YOUR_ID).snapshots()
来获取集合中的所有文档
It will return a List of QuerySnapshots from which you can access the docs and their data.它将返回一个 QuerySnapshot 列表,您可以从中访问文档及其数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.