‫The second step after creating the layouts is to create the model class.
‫So go to your package, select Kotlin Data class and name it as item model.
‫In Kotlin, a data class is a special type of class that is designed to hold data.
‫Data classes are commonly used for modeling immutable data, where the instances are intended to be
‫used to store and transport data, rather than to encapsulate behavior.
‫Here I need to pass three variables, because if we go back to the item layout, we have an image view
‫and two text views, so one int and two strings.
‫For that I'll use val name.
‫It's of type string val description.
‫It's of type string and val image.
‫It's of type int.
‫So the item model is the name of the data class.
‫Name, description and image are the properties of the data class, each declared with val keyword my
‫making them read only which is immutable.
‫So in summary, data classes in Kotlin simplify the creation and management of classes whose primary
‫purpose is to hold and represent data.
‫They promote concise and readable code, reducing boilerplate and enhancing the overall developer experience.