4/1/3
This commit is contained in:
@@ -206,9 +206,9 @@ class HomeCaptainController extends GetxController {
|
||||
await addToken();
|
||||
await getlocation();
|
||||
onButtonSelected();
|
||||
await getPaymentToday();
|
||||
await getDriverRate();
|
||||
getKazanPercent();
|
||||
await getKazanPercent();
|
||||
await getPaymentToday();
|
||||
getCountRideToday();
|
||||
getAllPayment();
|
||||
startPeriodicExecution();
|
||||
@@ -269,9 +269,10 @@ class HomeCaptainController extends GetxController {
|
||||
var res = await CRUD().get(
|
||||
link: AppLink.getDriverRate,
|
||||
payload: {'driver_id': box.read(BoxName.driverID).toString()});
|
||||
data = jsonDecode(res);
|
||||
|
||||
rating = data['message'][0]['rating'].toString();
|
||||
var decod = jsonDecode(res);
|
||||
// print(decod);
|
||||
rating = decod['message'][0]['rating'].toString();
|
||||
// print('rating $rating');
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
@@ -501,8 +501,10 @@ update ui for totla results
|
||||
isRideFinished = true;
|
||||
isRideStarted = false;
|
||||
isPriceWindow = false;
|
||||
if (cartype == 'Comfort') {
|
||||
if (cartype == 'Comfort' || cartype == 'Free Ride') {
|
||||
totalCost = price.toStringAsFixed(2);
|
||||
paymentAmount = totalCost;
|
||||
// update();
|
||||
}
|
||||
box.write(BoxName.statusDriverLocation, 'off');
|
||||
// changeRideToBeginToPassenger();
|
||||
@@ -600,7 +602,7 @@ update ui for totla results
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
recentDistanceToDash = Get.find<LocationController>().totalDistance;
|
||||
rideTimerFromBegin = i;
|
||||
price = cartype == 'Comfort'
|
||||
price = cartype == 'Comfort' || cartype == 'Free Ride'
|
||||
? (i ~/ 60) +
|
||||
(recentDistanceToDash *
|
||||
Get.find<HomeCaptainController>().comfortPrice)
|
||||
|
||||
Reference in New Issue
Block a user