String squery;
var sRef = _firestore
.collection("vehicles1")
.where("models", arrayContains: squery);
With this code i can display lists which include squery variable.
If I use this code in a for loop like this way;
List<String> item = ["motor", "car", "plane"];
var sRef;
for (int i = 0; i < item.length; i++) {
sRef = _firestore
.collection("vehicles1")
.where("models", arrayContains: item[i]);
}
I can display lists containing elements in the item list. But I am facing a problem here. When I want to use the for loop to display the lists containing the elements in the item list, the code additionally shows me the lists containing the last element in the item list.
For example, in this example, it shows me the lists that include motor, car, and plane, and it also shows lists that contain only plane, but I don't want to display only the lists that contain plane, I just want to display the lists that contain motor, car, plane.
So I just want to display All Doc list in my Firebase Documents.
And these are my Firebase Documents.
When I run the code with for loop that I wrote above, I get an output like this, but I just want to get the list named ALL.
Why I get list named PLANE with list named ALL. I just want get to list named ALL.