Following is my code
var items : MutableList = arrayListOf() items.add(TeacherDetails(it?.photo,it?.firstName,it?.lastName,it?.level))