KPListContent
fun <Item> KPListContent(itemList: PersistentList<Item>, itemContent: @Composable (index: Int, item: Item) -> Unit, modifier: Modifier = Modifier, outerPadding: PaddingValues = PaddingValues(horizontal = 16.dp, vertical = 12.dp), dividerContent: @Composable (index: Int, item: Item) -> Unit = { _, _ ->
Spacer(modifier = Modifier.height(12.dp))
})
A composable function that creates a lazy column with a list of items and optional divider content.
Parameters
Item
The type of items in the list.
itemList
A PersistentList
of items to be displayed in the list.
itemContent
A composable lambda to define the content for each item in the list.
modifier
A Modifier
for styling and layout customization. Default is Modifier
.
outerPadding
A PaddingValues
object to set the padding around the list content. Top and Bottom paddings will work as item padding in order to make items disappear when user scrolls to enhance UX. Default is PaddingValues(horizontal = 16.dp, vertical = 12.dp)
.
dividerContent
A composable lambda to define the content for the divider between items. Default is a Spacer
with a height of 12.dp.