Home > Blockchain >  Filtering content from Firebase
Filtering content from Firebase

Time:03-26

So I'm coding a healthy social media app using Flutter and Firebase as my database. I want to have a filter button where users can filter content based on the 'BoardType' field(in the picture) Is there any way I can do this? Firebase screen

CodePudding user response:

of course, you can do so using filters like:

 FirebaseFirestore.instance
                    .collection('posts')
                    .where("BoardType", isEqualTo: "Book of the Month").get();

which is a future that returns the documents that match your request.

  • Related