WEBVTT

00:00.980 --> 00:02.030
Welcome back.

00:02.030 --> 00:04.550
Let's start building our application.

00:04.550 --> 00:11.960
Here I'll create a new composable function named as Lazycolumn with sticky header.

00:11.960 --> 00:23.990
And inside it I'll create val grouped items equals to map of fruits to list of apple, banana, cherry,

00:24.020 --> 00:27.620
mango, grapes, watermelon.

00:28.760 --> 00:34.190
Then we need to create vegetables to list of carrot.

00:34.250 --> 00:35.270
Lettuce.

00:35.270 --> 00:36.410
Tomato.

00:36.440 --> 00:37.340
Onion.

00:37.340 --> 00:38.390
Potato.

00:38.420 --> 00:39.680
Eggplant.

00:41.240 --> 00:51.440
This code in Kotlin creates a map named Group items that maps categories of items to the list of items

00:51.440 --> 00:53.060
within those categories.

00:53.060 --> 01:01.910
Map of this function creates a map where each entry consists of a key and a value.

01:01.940 --> 01:06.830
Fruits and vegetables are the keys in the map.

01:06.830 --> 01:08.480
List of and.

01:08.480 --> 01:15.950
This list of are the values associated with the keys, fruits and vegetables respectively.

01:15.950 --> 01:19.700
So again, these are the keys fruits and vegetables.

01:19.700 --> 01:23.930
And these are the values for these keys respectively.

01:23.930 --> 01:33.230
And by the way in order to access the fruits we can specify for example variable my fruits equals to

01:33.260 --> 01:34.730
grouped items.

01:34.730 --> 01:36.950
And here we specify the key.

01:36.950 --> 01:40.820
So the output of this variable will be apple.

01:40.850 --> 01:41.390
Banana.

01:41.390 --> 01:41.810
Cherry.

01:41.840 --> 01:42.380
Mango.

01:42.380 --> 01:43.010
Grapes.

01:43.040 --> 01:43.700
Watermelon.

01:43.700 --> 01:46.100
All items in this key.

01:46.130 --> 01:52.250
This is how we create the map which will be the data source for our application.

01:52.250 --> 01:58.640
Later on, we'll edit this map and replace it with custom objects
