Homework

Homework — your menu

Homework — make the menu your own.

  1. Run the Preview or the app — you should see three pizza cards.
  2. Add more pizzas to sampleMenu (your favorites). The list should redraw.
  3. Improve the card. Add the category line to the Card (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 items is 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 ViewModel that 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.