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