Hey! I’m a student currently working on a school project about an restaurant app.
I have 12 menu in total, but some of them have 2 choices.
E.g : Customer can pick between HOT or COLD when ordering a coffee.
And, as a result, i have 23 different outcomes due to having the customer pick between 2 choices for some of the menu.
In my app, i have 2 screen.
The 1st Screen display all the 12 menu for customer to pick their dishes.
And the 2nd Screen is a cart that display what they have picked.
What im doing is im using TinyDB to record the quantity of those 23 outcomes, then transfer the data to the 2nd Screen.
If the quantity > 0 , then it will set the Label to true and set the amount to the quantity saved by TinyDB.
I’ve searched over the web that theres a method to minimise the blocks by using Procedure and AnyComponents instead of repeating the blocks 23 times.
Maybe someone can help me here?