Hi there,
I am trying to complete the following action.
I need to update the quantity of a product when I add it to my cart so I can disable the "add" button when the product is out of stock. I query the collection "articulos" from firestore and I save it in a page state "document(articulos)" list type . Then I show the collection in a view list.
I know I could do this by updating the quantity straight to firestore easily (and thats what the app does after the client pays), but I want to prevent from reading/writing to firestore all the time and I also think that there is no need to update the stock before the client pays, because he could cancel the cart before that.
I have tried everything and I simple don't know what to do :(
I have also try using .copyWith method in a custom code and it is also imposible
PLEASE HELP!
No way I can update item in page state document list - please help!
Troubleshooting
Resolved
I tried using .copyWith method in a custom code and it didn't work
I tried creating a JSON map with the fetched collection instead of a document list, and it didn't work either
Yes
3
3 replies