3/31/4
This commit is contained in:
@@ -364,16 +364,16 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
'order_id': body.toString(),
|
'order_id': body.toString(),
|
||||||
'status': 'Apply'
|
'status': 'Apply'
|
||||||
});
|
});
|
||||||
await CRUD()
|
var res = await CRUD()
|
||||||
.post(link: AppLink.updateStausFromSpeed, payload: {
|
.post(link: AppLink.updateStausFromSpeed, payload: {
|
||||||
'id': myList[16],
|
'id': myList[16],
|
||||||
'rideTimeStart': DateTime.now().toString(),
|
'rideTimeStart': DateTime.now().toString(),
|
||||||
'status': 'Apply',
|
'status': 'Apply',
|
||||||
'driver_id': box.read(BoxName.driverID),
|
'driver_id': box.read(BoxName.driverID),
|
||||||
}).then((value) {
|
});
|
||||||
var json = jsonDecode(value);
|
// .then((value) {
|
||||||
if (json['message'] ==
|
var json = jsonDecode(res);
|
||||||
"This ride is already taken by another driver.") {
|
if (res == "failure") {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title:
|
title:
|
||||||
"This ride is already taken by another driver."
|
"This ride is already taken by another driver."
|
||||||
@@ -382,8 +382,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
titleStyle: AppStyle.title,
|
titleStyle: AppStyle.title,
|
||||||
middleTextStyle: AppStyle.title,
|
middleTextStyle: AppStyle.title,
|
||||||
confirm: MyElevatedButton(
|
confirm: MyElevatedButton(
|
||||||
title: 'Ok'.tr,
|
title: 'Ok'.tr, onPressed: () => Get.back()));
|
||||||
onPressed: () => Get.back()));
|
|
||||||
} else if (json['message'] ==
|
} else if (json['message'] ==
|
||||||
"Ride data updated successfully") {
|
"Ride data updated successfully") {
|
||||||
List<String> bodyToPassenger = [
|
List<String> bodyToPassenger = [
|
||||||
@@ -401,8 +400,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
bodyToPassenger,
|
bodyToPassenger,
|
||||||
);
|
);
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.to(() => PassengerLocationMapPage(),
|
Get.to(() => PassengerLocationMapPage(), arguments: {
|
||||||
arguments: {
|
|
||||||
'passengerLocation': myList[0].toString(),
|
'passengerLocation': myList[0].toString(),
|
||||||
'passengerDestination': myList[1].toString(),
|
'passengerDestination': myList[1].toString(),
|
||||||
'Duration': myList[4].toString(),
|
'Duration': myList[4].toString(),
|
||||||
@@ -421,8 +419,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
'driverId': myList[18].toString(),
|
'driverId': myList[18].toString(),
|
||||||
'durationOfRideValue': myList[19].toString(),
|
'durationOfRideValue': myList[19].toString(),
|
||||||
'paymentAmount': myList[2].toString(),
|
'paymentAmount': myList[2].toString(),
|
||||||
'paymentMethod':
|
'paymentMethod': myList[13].toString() == 'true'
|
||||||
myList[13].toString() == 'true'
|
|
||||||
? 'visa'
|
? 'visa'
|
||||||
: 'cash',
|
: 'cash',
|
||||||
'isHaveSteps': myList[20].toString(),
|
'isHaveSteps': myList[20].toString(),
|
||||||
@@ -437,7 +434,7 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
'carType': myList[31].toString(),
|
'carType': myList[31].toString(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
// });
|
||||||
// Get.back();
|
// Get.back();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user