I have a boolean=false variable in my Firestore collection, and when i click in the button i must then variable changes for true, my code for this is simple but the firebase dont accept. Anyone have a ideia how i change the value of my boolean variable?
this.firestore.doc('lunch/isBag' + this.userID).update(true);
this method is called when i click in the button, but returns that error:
ERROR FirebaseError: Function DocumentReference.update() called with invalid data. Data must be an object, but it was: true (found in document lunch/isBagundefined)
that it's my collection and my variable that I want to change :
