11/20/1
This commit is contained in:
@@ -59,6 +59,7 @@ class MapDriverController extends GetxController {
|
||||
String stringRemainingTimeRideBegin = '';
|
||||
double progressTimerRideBegin = 0;
|
||||
late Timer timer;
|
||||
String? mapAPIKEY;
|
||||
|
||||
void onMapCreated(GoogleMapController controller) {
|
||||
LocationController locationController = Get.find<LocationController>();
|
||||
@@ -315,7 +316,7 @@ class MapDriverController extends GetxController {
|
||||
update();
|
||||
|
||||
var url =
|
||||
('${AppLink.googleMapsLink}directions/json?&language=en&avoid=tolls|ferries&destination=$destination&origin=$origin&key=${AppCredintials.mapAPIKEY}');
|
||||
('${AppLink.googleMapsLink}directions/json?&language=en&avoid=tolls|ferries&destination=$destination&origin=$origin&key=${mapAPIKEY}');
|
||||
|
||||
var response = await CRUD().getGoogleApi(link: url, payload: {});
|
||||
data = response['routes'][0]['legs'];
|
||||
@@ -359,7 +360,8 @@ class MapDriverController extends GetxController {
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
void onInit() async {
|
||||
mapAPIKEY = await storage.read(key: BoxName.mapAPIKEY);
|
||||
// Get the passenger location from the arguments.
|
||||
passengerLocation = Get.arguments['passengerLocation'];
|
||||
duration = Get.arguments['Duration'];
|
||||
|
||||
Reference in New Issue
Block a user