I am trying to get document snapshot by searching by recipe name and recipe name sore in data:
Query query = FirebaseFirestore.instance
.collection("recipes")
.where("name", isEqualTo: "test");
QuerySnapshot querySnapshot = await query.get();
Your name
field stored inside an object data
. So the query should be on data.name
Query query = FirebaseFirestore.instance
.collection("recipes")
.where("data.name", isEqualTo: "test");
To read about the nested Objects and .
notation, see the documentation on fields in nested objects.