1/24/1
This commit is contained in:
@@ -37,7 +37,7 @@ class GoogleMapPassengerWidget extends StatelessWidget {
|
||||
controller.clearPolyline();
|
||||
if (controller.dataCarsLocationByPassenger != null) {
|
||||
await controller.getMap(
|
||||
'${controller.myLocation.latitude},${controller.myLocation.longitude}',
|
||||
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
|
||||
'${argument.latitude.toString()},${argument.longitude.toString()}');
|
||||
|
||||
Get.back();
|
||||
@@ -131,7 +131,7 @@ class GoogleMapPassengerWidget extends StatelessWidget {
|
||||
// controller.bottomSheet();
|
||||
},
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: controller.myLocation,
|
||||
target: controller.passengerLocation,
|
||||
zoom: 15,
|
||||
),
|
||||
markers: {
|
||||
@@ -154,43 +154,44 @@ class GoogleMapPassengerWidget extends StatelessWidget {
|
||||
position: controller.newStartPointLocation,
|
||||
draggable: true,
|
||||
icon: controller.startIcon,
|
||||
infoWindow: const InfoWindow(
|
||||
title: 'Time',
|
||||
anchor: Offset(0.5, 0.5), // Adjust the anchor as needed
|
||||
// snippet: controller.durationFromDriverToPassenger
|
||||
// .toString(),
|
||||
),
|
||||
onDragEnd: (value) {
|
||||
print(value);
|
||||
},
|
||||
// infoWindow: InfoWindow(title: 'my location'.tr),
|
||||
),
|
||||
if (controller.isMarkersShown)
|
||||
Marker(
|
||||
markerId: MarkerId('Destination'.tr),
|
||||
position: controller.newMyLocation,
|
||||
position: controller.myDestination,
|
||||
draggable: true,
|
||||
icon: controller.endIcon,
|
||||
),
|
||||
if (controller.haveSteps)
|
||||
Marker(
|
||||
markerId: MarkerId('StartSteps'.tr),
|
||||
position: LatLng(
|
||||
double.parse(
|
||||
controller.placesCoordinate[0].split(',')[0]),
|
||||
double.parse(
|
||||
controller.placesCoordinate[0].split(',')[1])),
|
||||
draggable: true,
|
||||
icon: controller.startIcon,
|
||||
),
|
||||
if (controller.haveSteps)
|
||||
Marker(
|
||||
markerId: MarkerId('EndSteps'.tr),
|
||||
position: controller.newPointLocation4 == ''
|
||||
? LatLng(
|
||||
double.parse(
|
||||
controller.placesCoordinate[3].split(',')[0]),
|
||||
double.parse(
|
||||
controller.placesCoordinate[3].split(',')[1]))
|
||||
: controller.newPointLocation3 == ''
|
||||
? LatLng(
|
||||
double.parse(controller.placesCoordinate[2]
|
||||
.split(',')[0]),
|
||||
double.parse(controller.placesCoordinate[2]
|
||||
.split(',')[1]))
|
||||
: controller.newPointLocation2,
|
||||
draggable: true,
|
||||
icon: controller.endIcon,
|
||||
infoWindow: InfoWindow(
|
||||
anchor: const Offset(0.5, 0),
|
||||
title: 'Time',
|
||||
snippet: controller.durationByPassenger.toString()
|
||||
// snippet: controller.durationFromDriverToPassenger
|
||||
// .toString(),
|
||||
),
|
||||
onDragEnd: (value) {
|
||||
print(value);
|
||||
},
|
||||
// infoWindow: InfoWindow(title: 'my location'.tr),
|
||||
),
|
||||
// Marker(
|
||||
// markerId: MarkerId('Target'.tr),
|
||||
// position: controller.myDestination,
|
||||
// draggable: true,
|
||||
// onDragEnd: (v) {
|
||||
// print(v);
|
||||
// },
|
||||
// ),
|
||||
},
|
||||
polylines: {
|
||||
Polyline(
|
||||
@@ -283,7 +284,7 @@ class GoogleMapPassengerWidget extends StatelessWidget {
|
||||
circles: <Circle>{
|
||||
Circle(
|
||||
circleId: const CircleId('circle_id'),
|
||||
center: controller.myLocation,
|
||||
center: controller.passengerLocation,
|
||||
radius: 100,
|
||||
fillColor: Colors.blue.withOpacity(0.3),
|
||||
strokeColor: Colors.blue,
|
||||
|
||||
Reference in New Issue
Block a user