I had to do something like this while querying in Flutter Firebase;
Query nameRef = _firestore
.collectionGroup("Posts")
.where("name", isEqualTo: "word that I want search") or _firestore
.collectionGroup("Posts")
.where("writer", isEqualTo: "word that I want search");
But I couldn't find a right solution for this usage.
In other words, if the word I want to search is equal to writer or post name, I want to display the posts that are equal.