To implement the double header LazyColumn
your data should override the Item
class:
open class Item(
/* This String here defines a header */
open val type: String,
/* This String here defines subheader */
open val subType: String
)
All of the above properties should be filled for the double header LazyColumn
to work correctly.
To render your data you should call this Composable function:
fun DoubleHeaderLazyColumn(
/* The data which inherit from Item class */
data: List<Item>, // ->
modifier: Modifier,
/* Header Composable */
headerContent: @Composable (String) -> Unit,
/* Subheader Composable */
subHeaderContent: @Composable (String) -> Unit,
/* Composable for each item */
itemContent: @Composable (Item) -> Unit)
)
You can find a code example here.
If you want to see how it looks like, check this video.