How can i retrieve documents from the firebase when i press on a certain button?

Viewed 30

I'm new to flutter development so this might be basic knowledge to you. 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

1 Answers

You can get all documents in a collection by calling FirebaseFirestore.instance.collection(YOUR_ID).snapshots()

It will return a List of QuerySnapshots from which you can access the docs and their data.

Related