7/10/1
This commit is contained in:
@@ -313,7 +313,12 @@ class HomeCaptainController extends GetxController {
|
||||
payload: {'driverID': box.read(BoxName.driverID).toString()});
|
||||
data = jsonDecode(res);
|
||||
|
||||
totalMoneyInSEFER = data['message'][0]['total_amount'];
|
||||
totalMoneyInSEFER = data['message'][0]['total_amount'] ?? '0';
|
||||
update();
|
||||
}
|
||||
|
||||
void changeToAppliedRide(String status) {
|
||||
box.write(BoxName.rideStatus, status);
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@@ -222,6 +222,8 @@ class MapDriverController extends GetxController {
|
||||
'driverGoToPassengerTime': DateTime.now().toString(),
|
||||
'status': 'Applied'
|
||||
});
|
||||
|
||||
// Get.find<HomeCaptainController>().changeToAppliedRide('Applied');
|
||||
box.write(BoxName.rideStatus, 'Applied');
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
'DriverIsGoingToPassenger',
|
||||
@@ -284,8 +286,11 @@ class MapDriverController extends GetxController {
|
||||
remainingTimeInPassengerLocatioWait = 0;
|
||||
timeWaitingPassenger = 0;
|
||||
box.write(BoxName.statusDriverLocation, 'on');
|
||||
box.write(BoxName.rideStatus, 'Begin'); //todo ride details
|
||||
|
||||
// box.write(BoxName.rideStatus, 'Begin'); //
|
||||
// todo ride details
|
||||
// Get.find<HomeCaptainController>().changeToAppliedRide('Begin');
|
||||
box.write(BoxName.rideStatus, 'Begin');
|
||||
// Get.find<HomeCaptainController>().update();
|
||||
update();
|
||||
await CRUD().post(link: AppLink.updateRides, payload: {
|
||||
'id': rideId,
|
||||
@@ -490,6 +495,8 @@ class MapDriverController extends GetxController {
|
||||
isRideStarted = false;
|
||||
isPriceWindow = false;
|
||||
box.write(BoxName.rideStatus, 'Finished');
|
||||
// Get.find<HomeCaptainController>().changeToAppliedRide('Finished');
|
||||
// Get.find<HomeCaptainController>().update();
|
||||
totalCost = price < 30
|
||||
? carType != 'Comfort' && carType != 'Mashwari' && carType != 'Lady'
|
||||
? '20'
|
||||
|
||||
Reference in New Issue
Block a user