In an ecommerce flutter app project I am using the shortInfo field of my items collection as an unique id for each product. When add to cart is pressed it saves the shortInfo to an array field called userCartList at my users collection and I am using WhereIn to query this array but when I have more than 10 product my app crashes. What am I doing wrong here?
Here is my firestore structure:
Here is a snippet of the query I am making:
StreamBuilder<QuerySnapshot>(
stream: EcommerceApp.firestore
.collection("items")
.where("shortInfo", whereIn: EcommerceApp.sharedPreferences.getStringList(EcommerceApp.userCartList))
.snapshots()
)