7/6/5
This commit is contained in:
@@ -264,10 +264,29 @@ class CaptainWalletController extends GetxController {
|
||||
update();
|
||||
}
|
||||
|
||||
getKazanPercent() async {
|
||||
var res = await CRUD().get(
|
||||
link: AppLink.getKazanPercent,
|
||||
payload: {'country': box.read(BoxName.countryCode).toString()},
|
||||
);
|
||||
if (res != 'failure') {
|
||||
var json = jsonDecode(res);
|
||||
kazan = double.parse(json['message'][0]['kazan']);
|
||||
// naturePrice = double.parse(json['message'][0]['naturePrice']);
|
||||
// heavyPrice = double.parse(json['message'][0]['heavyPrice']);
|
||||
// latePrice = double.parse(json['message'][0]['latePrice']);
|
||||
// comfortPrice = double.parse(json['message'][0]['comfortPrice']);
|
||||
// speedPrice = double.parse(json['message'][0]['speedPrice']);
|
||||
// deliveryPrice = double.parse(json['message'][0]['deliveryPrice']);
|
||||
// mashwariPrice = double.parse(json['message'][0]['freePrice']);
|
||||
// fuelPrice = double.parse(json['message'][0]['fuelPrice']);
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
await Get.find<HomeCaptainController>().getKazanPercent();
|
||||
kazan = Get.find<HomeCaptainController>().kazan;
|
||||
getKazanPercent();
|
||||
|
||||
await refreshCaptainWallet();
|
||||
super.onInit();
|
||||
|
||||
Reference in New Issue
Block a user