This commit is contained in:
Hamza Aleghwairyeen
2024-04-08 23:28:51 +03:00
parent bc92709f9c
commit 207a87a5f0
5 changed files with 32 additions and 4 deletions

View File

@@ -836,6 +836,13 @@ class MapDriverController extends GetxController {
update();
}
double mpg = 0;
calculateConsumptionFuel() {
mpg = Get.find<HomeCaptainController>().fuelPrice /
12; //todo in register car add mpg in box
update();
}
late Duration durationToAdd;
int hours = 0;
int minutes = 0;
@@ -910,6 +917,7 @@ class MapDriverController extends GetxController {
durationToAdd = Duration(seconds: int.parse(duration));
hours = durationToAdd.inHours;
minutes = (durationToAdd.inMinutes % 60).round();
calculateConsumptionFuel();
// cancelCheckRidefromPassenger();
// checkIsDriverNearPassenger();
super.onInit();