I'm building an app on Flutter with Firebase, I've successfully added Firestore and everything works now.
getUsers() async {
final QuerySnapshot snapshot = await usersRef
.where("postsCount", isLessThan: 3)
// .where("username", isEqualTo: "Parzival")
.getDocuments();
snapshot.documents.forEach((DocumentSnapshot doc) {
print(doc.data);
print(doc.documentID);
print(doc.exists);
});
When I run the above cell with the second commented it works !
I want to run a composite query so in the terminal i followed the link google gives to create an Index.
When I manually create an Index there with the the correct fields and successfully enable it, Then I uncomment my line and run it, The terminal shows no error but it also doesn't print the information it was supposed to give.