In which task and step of the codelab can this issue be found?
'Populate text fields', step 3
Describe the problem
It isn't made clear that the init block needs to be below the itemId definition. Placing it above this definition causes a logic error where the text input fields are not filled in and any changes are not saved
Steps to reproduce?
Go to ui/item/ItemEditViewModel.kt
Cut and paste init block to top of class block
Open app and attempt to edit item
Note that the text input fields are empty
Fill in details and attempt to save
Note that the item details are not updated
VersionsAndroid Studio version: Android Studio Flamingo | 2022.2.1 Patch 2
API version of the emulator: API level 33
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? 'Populate text fields', step 3
Describe the problem It isn't made clear that the init block needs to be below the itemId definition. Placing it above this definition causes a logic error where the text input fields are not filled in and any changes are not saved
Steps to reproduce?
Versions Android Studio version: Android Studio Flamingo | 2022.2.1 Patch 2 API version of the emulator: API level 33