This commit is contained in:
Hamza Aleghwairyeen
2024-04-02 16:12:49 +03:00
parent 44fe1f494d
commit 417b8ffd94
3 changed files with 15 additions and 8 deletions

View File

@@ -180,15 +180,13 @@ class CRUD {
// print(jsonData);
if (response.statusCode == 200) {
if (jsonData['status'] == 'success') {
// Get.snackbar(
// jsonData['status'],
// jsonData['message'],
// );
// print(response.body);
return response.body;
} else {
return (jsonData['status']);
}
} else {
return response.statusCode;
}
return (jsonData['status']);
}
sendEmail(

View File

@@ -1180,6 +1180,7 @@ class MapPassengerController extends GetxController {
// If the trip duration is less than or equal to 50 minutes, then break the loop.
for (var i = 0; i < loopCount; i++) {
// Wait for 50 seconds.
print('loop is $i from $loopCount');
await Future.delayed(const Duration(seconds: 4));
await getDriverCarsLocationToPassengerAfterApplied();
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
@@ -1207,7 +1208,8 @@ class MapPassengerController extends GetxController {
['latitude']),
double.parse(datadriverCarsLocationToPassengerAfterApplied['message'][0]
['longitude']));
final driverAcceptedMarker = Marker(
print('driver position $driverPosition')
; final driverAcceptedMarker = Marker(
markerId: const MarkerId('driverToPassengers'),
position: driverPosition,
rotation: double.parse(
@@ -1665,6 +1667,8 @@ class MapPassengerController extends GetxController {
//print('Reloading markers ($reloadCount)');
if (!rideConfirm) {
reloadMarkers();
}else{
runWhenRideIsBegin();
}
if (reloadCount >= 35) {

View File

@@ -317,7 +317,12 @@ class OrderSpeedRequest extends StatelessWidget {
titleStyle: AppStyle.title,
middleTextStyle: AppStyle.title,
confirm: MyElevatedButton(
title: 'Ok'.tr, onPressed: () => Get.back()));
title: 'Ok'.tr,
onPressed: () {
Get.back();
Get.back();
Get.back();
}));
} else if (jsonDecode(res)['status'] == "success") {
List<String> bodyToPassenger = [
box.read(BoxName.driverID).toString(),