KOTLIN Recyclerview Crash Whenever I try add a data class
I am working on a project but I've trouble with this. Whenever I tried to use data class it crashs.
I tried with string it worked but I didn't make it work with dataclass. Actually when I try to add to ModelList a dataclass object it crash too. Please help Thank you.
This is my adapter.
class myRecyclerViewAdapter(private val ModelList:ArrayList) :
RecyclerView.Adapter() {
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
fun bind(modelList: DrugModel) {...