Making the movie and series detail screen
In this section, we will create the detail screen, which is the screen that will be shown when the user clicks a movie or series from the list. This screen will include information such as the plot summary, cast, year of release, and so on.
Before building the necessary composables, we need to think about the models we need. Let’s start creating them.
Creating the detail models
To define the models, we need to take into account the data we want to show in the detail screen. As we would like to create the same model for both movies and series, we will build an ItemDetail
model as follows:
data class ItemDetail( val type: Type, val title: String, val imageUrl: String, val rating: String, val year: String, val cast: List<String>, val description: String...