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

Apache License 2.0
77 stars 84 forks source link

Section 8 code snippet error #53

Open AscentionOne opened 1 year ago

AscentionOne commented 1 year ago

In section 8 "Implement sell item" Add a function in the ViewModel part step 3.

We are creating a val currentItem and the provided snippet val currentItem = uiState.value.toItem() is incorrect.

The correct one should be: val currentItem = uiState.value.itemDetails.toItem()

The itemDetails is missing,