Jetpack Compose

Oct 22 2020 Kotlin 1.4, Android 11, Android Studio 4.2

Part 1: Jetpack Compose Basics

8. Build Common UI Components: Part 2

Lesson Complete

Play Next Lesson
Save for later
About this episode
See versions
See forum comments
Cinema mode Mark as Complete Download course materials
Previous episode: 7. Build Common UI Components: Part 1 Next episode: 9. Build Common UI Components: Part 3

When building the AddBookReview feature, specifically the RatingBar handler for rating selection, make sure to also add the following line of code to the lambda function: _bookReviewState.value = _bookReviewState.value.copy(rating = newRating).

This will store the data within the ReviewState, to save the rating to the database when you finish adding a review.