0

I want to use a OR condition in flutter firebase but it returns AND condition. I have try for a day

FirebaseFirestore.instance
        .collection("Flight_Details")
        .where("Date", isEqualTo: widget.alanFilter)
        .where("From",isEqualTo: widget.fromAlanFilter)
        .where("To",isEqualTo: widget.toAlanFilter)
        .snapshots(),
marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
  • 1
    OR condition is not supported, seems to be a duplicated question as in https://stackoverflow.com/questions/63092249/how-to-add-an-or-condition-to-flutter-firebase-queries – Elihu Del Valle Mar 21 '22 at 05:32

1 Answers1

1

According to the official documentation, Cloud Firestore provides limited support for logical OR queries. The in, and array-contains-any operators support a logical OR of up to 10 equality (==) or array-contains conditions on a single field. For other cases, create a separate query for each OR condition and merge the query results in your app.

For more information please go through this stackoverflow link.