google-developer-training / android-basics-kotlin-cupcake-app

Apache License 2.0
103 stars 163 forks source link

Android Basics: Shared ViewModel #71

Closed casti093 closed 10 months ago

casti093 commented 2 years ago

URL of codelab

In which task and step of the codelab can this issue be found?

Describe the problem

fun orderCupcake(quantity: Int) { sharedViewModel.setQuantity(quantity) if (sharedViewModel.hasNoFlavorSet()) { sharedViewModel.setFlavor(getString(R.string.vanilla)) } findNavController().navigate(R.id.action_startFragment_to_flavorFragment) }

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions Android Studio version: API version of the emulator:

Additional information Include screenshots if they would be useful in clarifying the problem.