4/2/2
This commit is contained in:
@@ -180,15 +180,13 @@ class CRUD {
|
|||||||
// print(jsonData);
|
// print(jsonData);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
// Get.snackbar(
|
|
||||||
// jsonData['status'],
|
|
||||||
// jsonData['message'],
|
|
||||||
// );
|
|
||||||
// print(response.body);
|
|
||||||
return response.body;
|
return response.body;
|
||||||
|
} else {
|
||||||
|
return (jsonData['status']);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return response.statusCode;
|
||||||
}
|
}
|
||||||
return (jsonData['status']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sendEmail(
|
sendEmail(
|
||||||
|
|||||||
@@ -1180,6 +1180,7 @@ class MapPassengerController extends GetxController {
|
|||||||
// If the trip duration is less than or equal to 50 minutes, then break the loop.
|
// If the trip duration is less than or equal to 50 minutes, then break the loop.
|
||||||
for (var i = 0; i < loopCount; i++) {
|
for (var i = 0; i < loopCount; i++) {
|
||||||
// Wait for 50 seconds.
|
// Wait for 50 seconds.
|
||||||
|
print('loop is $i from $loopCount');
|
||||||
await Future.delayed(const Duration(seconds: 4));
|
await Future.delayed(const Duration(seconds: 4));
|
||||||
await getDriverCarsLocationToPassengerAfterApplied();
|
await getDriverCarsLocationToPassengerAfterApplied();
|
||||||
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
|
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
|
||||||
@@ -1207,7 +1208,8 @@ class MapPassengerController extends GetxController {
|
|||||||
['latitude']),
|
['latitude']),
|
||||||
double.parse(datadriverCarsLocationToPassengerAfterApplied['message'][0]
|
double.parse(datadriverCarsLocationToPassengerAfterApplied['message'][0]
|
||||||
['longitude']));
|
['longitude']));
|
||||||
final driverAcceptedMarker = Marker(
|
print('driver position $driverPosition')
|
||||||
|
; final driverAcceptedMarker = Marker(
|
||||||
markerId: const MarkerId('driverToPassengers'),
|
markerId: const MarkerId('driverToPassengers'),
|
||||||
position: driverPosition,
|
position: driverPosition,
|
||||||
rotation: double.parse(
|
rotation: double.parse(
|
||||||
@@ -1665,6 +1667,8 @@ class MapPassengerController extends GetxController {
|
|||||||
//print('Reloading markers ($reloadCount)');
|
//print('Reloading markers ($reloadCount)');
|
||||||
if (!rideConfirm) {
|
if (!rideConfirm) {
|
||||||
reloadMarkers();
|
reloadMarkers();
|
||||||
|
}else{
|
||||||
|
runWhenRideIsBegin();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reloadCount >= 35) {
|
if (reloadCount >= 35) {
|
||||||
|
|||||||
@@ -317,7 +317,12 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
titleStyle: AppStyle.title,
|
titleStyle: AppStyle.title,
|
||||||
middleTextStyle: AppStyle.title,
|
middleTextStyle: AppStyle.title,
|
||||||
confirm: MyElevatedButton(
|
confirm: MyElevatedButton(
|
||||||
title: 'Ok'.tr, onPressed: () => Get.back()));
|
title: 'Ok'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
Get.back();
|
||||||
|
Get.back();
|
||||||
|
}));
|
||||||
} else if (jsonDecode(res)['status'] == "success") {
|
} else if (jsonDecode(res)['status'] == "success") {
|
||||||
List<String> bodyToPassenger = [
|
List<String> bodyToPassenger = [
|
||||||
box.read(BoxName.driverID).toString(),
|
box.read(BoxName.driverID).toString(),
|
||||||
|
|||||||
Reference in New Issue
Block a user