The second step is to create the lazycolumn that contains a sticky header for each category and for
each key in the map and cards for each item in the list.
Lazycolumn grouped items dot for each.
Here, grouped items dot for each will iterate over each entry in the map.
You can see the key would be a string and the value would be a list of strings.
I'll continue with a header and items.
Header is the key.
For example, fruits and vegetables and items is the value.
For example, list of fruits or a list of vegetables inside the foreach loop.
We print the header, start with sticky header, and here we're going to call another composable function
that define the sticky header.
Also we're going to define items which would be the items that we passed as arguments in this lambda
expression.
Let's create this sticky header outside this composable Function.
Let's create another composable function.
Name it as my custom header.
This function takes into the parameter a title of type string.
Then we need to customize it.
Create a new text composable.
That text would be title.
The font size would be 32 SP and the modifier modifier dot fill.
Maximum width and set the background for this header to red.
Also set some padding eight dpi.
This is my custom header.
Let's go up and the sticky header.
Call my custom header and pass the header as a value.
So here I'm passing the header and the items are passed down.
The sticky header.
As we said in the previous videos, is an experimental.
So we need to add this annotation opt in experimental foundation API, which means that it may or may
not be removed in the next updates of Jetpack Compose.