Homework
Homework — your menu
Homework — make the menu your own.
- Run the Preview or the app — you should see three pizza cards.
- Add more pizzas to
sampleMenu(your favorites). The list should redraw. - Improve the card. Add the
categoryline to theCard(smaller, dimmer, e.g.MaterialTheme.typography.labelSmall), or adjust the spacing (padding). Watch the Preview.
Required tests:
- Preview test: the Preview shows your cards with no errors (if
itemsis red — remember the import gotcha). - List test: after adding a pizza to
sampleMenu, it appears on screen.
To submit: a screenshot of your menu (at least 4 pizzas).
Tip. You have a nice menu — but it does nothing. Tap a pizza — nothing happens. Next lesson we add the CART, and with it your first real state: a
ViewModelthat holds what's been added and computes the total live. It's the MVI pattern (Event → ViewModel → state → UI) the whole of Pica rests on. We wire the menu to the cart later; first we need the cart itself.