I want to implement OR condition in flutter using the multiple where();
method but this returns AND
condition.
Following is my code for query
Future<Stream<QuerySnapshot>> getOrders() async {
return FirebaseFirestore.instance
.collection("Orders")
.orderBy("timestamp")
.where("isCredentialUploaded", isEqualTo: true),
.where("isTransactionDone", isEqualTo: true)
.snapshots();
}
But this makes the AND Condition, like this
if(isCredentialUploaded && isTransactionDone)
Is there any way I can get the OR condition in Firebase Firestore?
Result i want:
if(isCredentialUploaded || isTransactionDone)