How many read in firebase if under one await I run a loop and I have 20 documents in total but my loop will filter out some after checking. After checking it will take 10 data. But for taking, it needs to read 20 documents. So how many read will it count? I heard one await one read. But my firebase dashboard is showing 5/6 times more. In the picture i have shown the code. please tell me how many read will it count?
Future getUser() async {
final id = await FirebaseAuth.instance.currentUser();
userId=id.uid;
await Firestore.instance.collection('user').getDocuments().then((users) {
print("loop running");
for (var user in users.documents) {
if ((!seenList1.contains(user.documentID)) &&
(!chosenList1.contains(user.documentID)) &&
(!showId1.contains(user.documentID)) &&
(user.documentID != userId) &&
("male" == user['gender'])
) {
loc(user['Location'].latitude, user['Location'].longitude).then((result){
if(result==true){
setState(() {
showId1.add(user.documentID) ;
showName1.add(user['name']) ; }
});
}
}
});
return ;
}