Firebase & Flutter: check if value exists

Viewed 30

this is my very first stackoverflow question :D

I am currently trying to build a shopping list app in Flutter. I use firebase as database.

You can add ingredients to the list "Items", these get beside the cryptic key some attributes like "Name" and "Quantity". Now I want to make the app so that if "Milk" is already on the shopping list, and then I want to add "Milk" again, the "Number" of milk is increased by one. Currently, "Milk" is then simply on the list twice.

The structure of the database is as follows: database

I am grateful for any tips. Cheers

0 Answers
Related