7/20/1
This commit is contained in:
@@ -108,7 +108,7 @@ class CaptainWalletController extends GetxController {
|
||||
link: AppLink.getAllPaymentFromRide,
|
||||
payload: {'driverID': box.read(BoxName.driverID)},
|
||||
);
|
||||
isLoading = false;
|
||||
// isLoading = false;
|
||||
if (res != 'failure') {
|
||||
walletDate = jsonDecode(res);
|
||||
totalAmount = walletDate['message'][0]['total_amount'] ?? '0';
|
||||
@@ -120,11 +120,14 @@ class CaptainWalletController extends GetxController {
|
||||
totalAmountVisa = walletDateVisa['message'][0]['diff'] ?? '0';
|
||||
|
||||
update();
|
||||
} else {
|
||||
totalAmount = "0";
|
||||
totalAmountVisa = "0";
|
||||
}
|
||||
}
|
||||
|
||||
Future getCaptainWalletFromBuyPoints() async {
|
||||
isLoading = true;
|
||||
// isLoading = true;
|
||||
update();
|
||||
|
||||
var res = await CRUD().get(
|
||||
@@ -134,8 +137,7 @@ class CaptainWalletController extends GetxController {
|
||||
isLoading = false;
|
||||
// update();
|
||||
walletDriverPointsDate = jsonDecode(res);
|
||||
if (walletDriverPointsDate['message'][0]['driverID'].toString() ==
|
||||
box.read(BoxName.driverID).toString()) {
|
||||
if (res != 'failure') {
|
||||
double totalPointsDouble = double.parse(
|
||||
walletDriverPointsDate['message'][0]['total_amount'].toString());
|
||||
totalPoints = totalPointsDouble.toStringAsFixed(0);
|
||||
|
||||
Reference in New Issue
Block a user