Home > Mobile >  How to compare Uid in Flutter
How to compare Uid in Flutter

Time:06-18

In the below code i need to compare the uid and return the result if its true. Im new to Flutter. Please help me to learn

stream: FirebaseFirestore.instance
                    .collection('tripdetails')
                    .snapshots()
                    .where((event) => false)

CodePudding user response:

Share a screenshot of the data and adequately explain what you want to compare. That will help us to provide a proper answer. Generally to compare uid,

in the stream, you can get the total collection data, and then inside the builder you can get the specific doc that matches the required uid.

CodePudding user response:

If you want to perform a query on the database, that'd look something like:

FirebaseFirestore.instance
  .collection('tripdetails')
  .where('uid', isEqualTo: 'theUidValueToFilterOn')
  .snapshots()
  • Related