WEBVTT

00:00.080 --> 00:00.960
Welcome back.

00:01.000 --> 00:07.440
In this video we're going to add more extended floating action buttons to this expandable floating action

00:07.440 --> 00:07.960
button.

00:08.280 --> 00:12.560
And add some functionalities to those buttons.

00:12.560 --> 00:15.800
Let's go to Expandable Fab here.

00:15.920 --> 00:19.880
Create an extended floating action button.

00:19.880 --> 00:22.360
Set onClick parameter.

00:22.400 --> 00:31.000
The first extended button will upload the marker on the map to Firebase Firestore, set the expanded

00:31.040 --> 00:35.800
to false and then call on request.

00:36.720 --> 00:38.960
This is the onClick parameter.

00:39.200 --> 00:48.320
Here we need to add icon default dot add content description equals to null text request.

00:48.360 --> 00:57.720
Right now let's pass the request right as a parameter for this expandable map on request right?

00:57.720 --> 01:03.440
Also a lambda expression taking no parameters and returning nothing.

01:03.600 --> 01:07.120
Now let's add the functionality on request right?

01:07.120 --> 01:09.040
Go to Uber Clone map.

01:09.040 --> 01:14.320
Here we have an error we need to specify on request right.

01:14.320 --> 01:17.380
So on request tried what we need to do.

01:17.780 --> 01:19.940
Set the selected location.

01:19.980 --> 01:20.300
Dot.

01:20.340 --> 01:20.740
Let.

01:20.780 --> 01:30.140
If it is not null, go and get the location of the selected marker and call add marker function that

01:30.140 --> 01:31.420
we created before.

01:31.620 --> 01:32.980
In the previous videos.

01:33.100 --> 01:34.820
Call the selected marker.

01:35.020 --> 01:42.900
Set the destination the selected location dot latitude and selected location longitude.

01:42.940 --> 01:47.260
Okay, now let's add the other two parameters.

01:47.300 --> 01:55.780
The Onsuccess don't do anything, you can override them later on and Onfailure don't do anything.

01:55.820 --> 01:59.500
Let's test this floating action button.

01:59.540 --> 02:01.060
This is our application.

02:01.340 --> 02:02.740
The request tried.

02:02.780 --> 02:05.140
Extended fab added.

02:05.180 --> 02:12.300
Now let's go to here to Bolivia and set the selected location in Bolivia.

02:12.340 --> 02:17.340
Select it and let's go to our firebase.

02:17.380 --> 02:19.740
Let me remove those destinations.

02:19.900 --> 02:20.500
Here we go.

02:20.540 --> 02:25.380
We have four markers and this is the selected location.

02:25.620 --> 02:27.340
Click on request right.

02:27.380 --> 02:28.220
Let me check.

02:28.220 --> 02:29.140
And here we go.

02:29.180 --> 02:32.810
The destination is added successfully.

02:33.010 --> 02:34.810
So congratulations guys.

02:35.170 --> 02:36.490
The marker.

02:36.530 --> 02:45.690
The destination is added with the name coordinates and long with lat long fields.

02:45.810 --> 02:48.730
Here in our markers collection.

02:48.930 --> 02:56.410
Okay so this is the functionality of adding markers on Firebase Firestore.

02:56.610 --> 03:00.410
Now let me select this drill root.

03:00.450 --> 03:02.850
Let me check if there is a response.

03:02.850 --> 03:05.250
And congratulations guys.

03:05.490 --> 03:10.610
This is the main idea behind this application.

03:10.610 --> 03:15.570
So here we are requesting a marker destination A ride.

03:15.770 --> 03:18.330
So every marker represent a ride.

03:18.410 --> 03:22.210
The user the current user here is a driver.

03:22.410 --> 03:28.210
So you can upload rides markers to Firestore.

03:28.370 --> 03:33.090
And the driver select the nearest marker.

03:33.090 --> 03:36.650
And the Google Maps SDK will.

03:36.650 --> 03:42.450
And the directions API will tell him the route that he should go.
