I'm trying to execute a query that has where and orderBy in a FirebaseFirestore.instance.collection('collectionName').where('fieldName1', isEqualTo: 'value1').orderBy('fieldName1', descending:true).snapshots() statement. I've also created a composite index for both fields defined in the above statement.
Though, I'm getting this error:
[log] [cloud_firestore/failed-precondition] Operation was rejected because the system is not in a state required for the operation's execution. If performing a query, ensure it has been indexed via the Firebase console.
I'm using
firebase_core: ^1.3.0
cloud_firestore: ^2.3.0