3/27/5
This commit is contained in:
@@ -115,6 +115,9 @@ class MapPassengerController extends GetxController {
|
||||
bool startLocationFromMap3 = false;
|
||||
bool startLocationFromMap4 = false;
|
||||
List startLocationFromMapAll = [];
|
||||
double latePrice = 0;
|
||||
double heavyPrice = 0;
|
||||
double naturePrice = 0;
|
||||
bool heightMenuBool = false;
|
||||
bool isPickerShown = false;
|
||||
bool isPointsPageForRider = false;
|
||||
@@ -2144,18 +2147,18 @@ class MapPassengerController extends GetxController {
|
||||
|
||||
update();
|
||||
if (currentTime.hour >= 22 && currentTime.hour < 5) {
|
||||
costDistance = distance * 3.9;
|
||||
costDistance = distance * latePrice;
|
||||
update();
|
||||
} else if (currentTime.hour >= 13 && currentTime.hour <= 16) {
|
||||
if (averageDuration > 2.5) {
|
||||
costDistance = distance * 4;
|
||||
costDistance = distance * heavyPrice;
|
||||
update();
|
||||
} else {
|
||||
costDistance = distance * 3.5;
|
||||
costDistance = distance * naturePrice;
|
||||
update();
|
||||
}
|
||||
} else {
|
||||
costDistance = distance * 3.4;
|
||||
costDistance = distance * (naturePrice - .1);
|
||||
update();
|
||||
}
|
||||
//print('cost $cost');
|
||||
@@ -2295,8 +2298,9 @@ class MapPassengerController extends GetxController {
|
||||
var res = await CRUD().get(link: AppLink.getKazanPercent);
|
||||
if (res != 'failure') {
|
||||
kazan = double.parse(jsonDecode(res)['message'][0]['kazan']);
|
||||
print(res);
|
||||
print(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']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user