This commit is contained in:
Hamza-Ayed
2024-03-25 17:15:13 +03:00
parent 5c702e7d06
commit 0f79b2d86b
20 changed files with 327 additions and 179 deletions

View File

@@ -546,7 +546,10 @@ update ui for totla results
// }));
// }
// add wallet from passenger from driver
Get.to(() => RatePassenger());
Get.to(() => RatePassenger(), arguments: {
'passengerId': passengerId,
'rideId': rideId,
});
// Get.back();
}
@@ -653,22 +656,24 @@ update ui for totla results
final previousLocationOfDrivers = await sql.getCustomQuery('''SELECT
*
FROM
${TableName.carLocations}
${TableName.rideLocation}
WHERE
order_id = $rideId
ORDER BY
created_at DESC
LIMIT
1''');
print(previousLocationOfDrivers);
//get from sql
if (previousLocationOfDrivers.isNotEmpty) {
var lat = double.parse(previousLocationOfDrivers[0]['lat']);
var lng = double.parse(previousLocationOfDrivers[0]['lng']);
LatLng prev = LatLng(lat, lng);
recentAngelToMarker = calculateAngleBetweenLocations(prev, myLocation);
recentDistanceToDash =
calculateDistanceBetweenLocations(prev, myLocation);
print('recentAngelToMarker $recentAngelToMarker');
print('recentDistanceToDash $recentDistanceToDash');
}
sql.insertData({
'order_id': rideId,
@@ -683,7 +688,7 @@ LIMIT
position: locationController.myLocation,
draggable: true,
icon: carIcon,
rotation: recentAngelToMarker,
rotation: locationController.heading,
// infoWindow: const InfoWindow(
// title: 'Time',
// ),
@@ -724,7 +729,7 @@ LIMIT
void addCustomEndIcon() {
ImageConfiguration config = ImageConfiguration(
size: const Size(30, 30), devicePixelRatio: Get.pixelRatio);
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
BitmapDescriptor.fromAssetImage(config, 'assets/images/b.png',
mipmaps: false)
.then((value) {