A slot based composable for creating a list header item.
ScalingLazyColumnWithHeaders
@Composable
fun ScalingLazyColumnWithHeaders() {
ScalingLazyColumn(modifier = Modifier.fillMaxWidth()) {
item { ListHeader { Text("Header1") } }
items(5) {
Chip(
onClick = {},
label = { Text("List item $it") },
colors = ChipDefaults.secondaryChipColors(),
)
}
item { ListHeader { Text("Header2") } }
items(5) {
Chip(
onClick = {},
label = { Text("List item ${it + 5}") },
colors = ChipDefaults.secondaryChipColors(),
)
}
}
}