google-developer-training / basic-android-kotlin-compose-training-inventory-app

Apache License 2.0
77 stars 84 forks source link

Read and update data using Room #68

Open Malik-Gatin opened 11 months ago

Malik-Gatin commented 11 months ago

URL of codelab: https://developer.android.com/codelabs/basic-android-kotlin-compose-update-data-room?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-6-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-update-data-room#7

In which task and step of the codelab can this issue be found? Task "Add a function in the ViewModel", step 3.

Describe the problem In the definition of the variable "val currentItem = uiState.value.toItem()" missing ".itemDetails"

Steps to reproduce?

  1. Go to url, step 3 task "Add a function in the ViewModel"
  2. See flaw: In step 5, when defining the variable "currentItem", the assignment is correct: "val currentItem = uiState.value.itemDetails.toItem()", that is, ".itemDetails" is not skipped, unlike step 3.

Additional information image image