This commit is contained in:
Hamza Aleghwairyeen
2024-04-08 20:40:02 +03:00
parent e59e94a04e
commit bc92709f9c
5 changed files with 18 additions and 11 deletions

View File

@@ -116,6 +116,7 @@ class MapPassengerController extends GetxController {
bool startLocationFromMap4 = false;
List startLocationFromMapAll = [];
double latePrice = 0;
double fuelPrice = 0;
double heavyPrice = 0;
double naturePrice = 0;
bool heightMenuBool = false;
@@ -2438,12 +2439,17 @@ class MapPassengerController extends GetxController {
double passengerRate = 5;
getKazanPercent() async {
var res = await CRUD().get(link: AppLink.getKazanPercent);
var res = await CRUD().get(
link: AppLink.getKazanPercent,
payload: {'country': box.read(BoxName.countryCode).toString()},
);
if (res != 'failure') {
// print(jsonDecode(res));
kazan = double.parse(jsonDecode(res)['message'][0]['kazan']);
naturePrice = double.parse(jsonDecode(res)['message'][0]['naturePrice']);
heavyPrice = double.parse(jsonDecode(res)['message'][0]['heavyPrice']);
latePrice = double.parse(jsonDecode(res)['message'][0]['latePrice']);
fuelPrice = double.parse(jsonDecode(res)['message'][0]['fuelPrice']);
}
}
@@ -2452,7 +2458,7 @@ class MapPassengerController extends GetxController {
link: AppLink.getPassengerRate,
payload: {'passenger_id': box.read(BoxName.passengerID)});
if (res != 'failure') {
passengerRate = jsonDecode(res)['message']['rating'];
passengerRate = jsonDecode(res)['message']['rating'].toDouble();
}
}