This commit is contained in:
Hamza-Ayed
2024-06-08 02:12:15 +03:00
parent 8864261523
commit ac84011102
13 changed files with 128 additions and 665 deletions

View File

@@ -63,13 +63,39 @@ class OrderHistory extends StatelessWidget {
width: Get.width * .75,
child: GoogleMap(
initialCameraPosition: CameraPosition(
target: Get.find<
MapPassengerController>()
.passengerLocation, // Assuming passenger location is available
zoom: 15,
target: LatLng(
(double.parse(
rides['start_location']
.toString()
.split(',')[0]) +
double.parse(
rides['end_location']
.toString()
.split(',')[0])) /
2,
(double.parse(
rides['start_location']
.toString()
.split(',')[1]) +
double.parse(
rides['end_location']
.toString()
.split(',')[1])) /
2,
),
zoom: 12,
),
// bounds: LatLngBounds(
// northeast: LatLng(
// double.parse(rides['end_location'].toString().split(',')[0]),
// double.parse(rides['end_location'].toString().split(',')[1]),
// ),
// southwest: LatLng(
// double.parse(rides['start_location'].toString().split(',')[0]),
// double.parse(rides['start_location'].toString().split(',')[1]),
// ),
// ),
zoomControlsEnabled: true,
// liteModeEnabled: false,
polylines: {
Polyline(
zIndex: 2,
@@ -106,6 +132,7 @@ class OrderHistory extends StatelessWidget {
width: 5,
),
},
mapType: MapType.normal,
),
),
Row(
@@ -122,12 +149,17 @@ class OrderHistory extends StatelessWidget {
),
Text(
rides['status'],
style: rides['status'] !=
style: rides['status'] ==
'Canceled'.tr
? AppStyle.subtitle.copyWith(
color: AppColor.greenColor)
: AppStyle.subtitle.copyWith(
color: AppColor.redColor),
color: AppColor.redColor)
: rides['status'] == 'Finished'.tr
? AppStyle.subtitle.copyWith(
color:
AppColor.greenColor)
: AppStyle.subtitle.copyWith(
color:
AppColor.yellowColor),
),
Text(
'${'Price is'.tr} ${rides['price']}',