Nikhil Parab
01/25/2025, 6:08 PMmodelItems.forEach { parendIndex, currentItem->
when(currentItem.type) {
Type1-> item { Content(currentItem) }
Type2-> items(currentItem) {
ParentContent(currentItem.parentData)
ChildContent(currentItem.childData)
}
}
}
problem is that, I can't pass modelItems directly to items fun in the first case, I have to render single block using forEach, which I think is not good, is there a better way of handling this, or should I just create a different screen for another List ?Zach Klippenstein (he/him) [MOD]
01/25/2025, 10:27 PMitems
just basically calls forEach over the list anyway.mreiter
01/28/2025, 12:05 PMcontentType
parameter to your call to item(s)
contentType - the type of the content of this item. The item compositions of the same type could be reused more efficiently. Note that null is a valid type and items of such type will be considered compatible.