passnger/5/2/1
This commit is contained in:
@@ -30,57 +30,57 @@ class CaptainWalletController extends GetxController {
|
|||||||
await addDriverWallet('fromBudget', pointFromBudget.toString());
|
await addDriverWallet('fromBudget', pointFromBudget.toString());
|
||||||
update();
|
update();
|
||||||
Get.back();
|
Get.back();
|
||||||
getCaptainWalletFromRide();
|
// getCaptainWalletFromRide();
|
||||||
getCaptainWalletFromBuyPoints();
|
// getCaptainWalletFromBuyPoints();
|
||||||
checkAccountCaptainBank();
|
// checkAccountCaptainBank();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future getCaptainWalletFromRide() async {
|
// Future getCaptainWalletFromRide() async {
|
||||||
isLoading = true;
|
// isLoading = true;
|
||||||
update();
|
// update();
|
||||||
var res = await CRUD().get(
|
// var res = await CRUD().get(
|
||||||
link: AppLink.getAllPaymentFromRide,
|
// link: AppLink.getAllPaymentFromRide,
|
||||||
payload: {'driverID': box.read(BoxName.driverID)},
|
// payload: {'driverID': box.read(BoxName.driverID)},
|
||||||
);
|
// );
|
||||||
walletDate = jsonDecode(res);
|
// walletDate = jsonDecode(res);
|
||||||
totalAmount = walletDate['message'][0]['total_amount'].toString() == null
|
// totalAmount = walletDate['message'][0]['total_amount'].toString() == null
|
||||||
? '0'
|
// ? '0'
|
||||||
: walletDate['message'][0]['total_amount'];
|
// : walletDate['message'][0]['total_amount'];
|
||||||
print(totalAmount);
|
// print(totalAmount);
|
||||||
|
|
||||||
var res1 = await CRUD().get(
|
// var res1 = await CRUD().get(
|
||||||
link: AppLink.getAllPaymentVisa,
|
// link: AppLink.getAllPaymentVisa,
|
||||||
payload: {'driverID': box.read(BoxName.driverID)});
|
// payload: {'driverID': box.read(BoxName.driverID)});
|
||||||
walletDateVisa = jsonDecode(res1);
|
// walletDateVisa = jsonDecode(res1);
|
||||||
totalAmountVisa = walletDateVisa['message'][0]['diff'].toString() == null
|
// totalAmountVisa = walletDateVisa['message'][0]['diff'].toString() == null
|
||||||
? '0'
|
// ? '0'
|
||||||
: walletDateVisa['message'][0]['diff'];
|
// : walletDateVisa['message'][0]['diff'];
|
||||||
print(totalAmountVisa);
|
// print(totalAmountVisa);
|
||||||
isLoading = false;
|
// isLoading = false;
|
||||||
update();
|
// update();
|
||||||
}
|
// }
|
||||||
|
|
||||||
Future getCaptainWalletFromBuyPoints() async {
|
// Future getCaptainWalletFromBuyPoints() async {
|
||||||
isLoading = true;
|
// isLoading = true;
|
||||||
update();
|
// update();
|
||||||
var res = await CRUD().get(
|
// var res = await CRUD().get(
|
||||||
link: AppLink.getDriverPaymentPoints,
|
// link: AppLink.getDriverPaymentPoints,
|
||||||
payload: {'driverID': box.read(BoxName.driverID)},
|
// payload: {'driverID': box.read(BoxName.driverID)},
|
||||||
);
|
// );
|
||||||
walletDriverPointsDate = jsonDecode(res);
|
// walletDriverPointsDate = jsonDecode(res);
|
||||||
if (walletDriverPointsDate['message'][0]['driverID'].toString() ==
|
// if (walletDriverPointsDate['message'][0]['driverID'].toString() ==
|
||||||
box.read(BoxName.driverID)) {
|
// box.read(BoxName.driverID)) {
|
||||||
double totalPointsDouble = double.parse(
|
// double totalPointsDouble = double.parse(
|
||||||
walletDriverPointsDate['message'][0]['total_amount'].toString());
|
// walletDriverPointsDate['message'][0]['total_amount'].toString());
|
||||||
totalPoints = totalPointsDouble.toStringAsFixed(0);
|
// totalPoints = totalPointsDouble.toStringAsFixed(0);
|
||||||
} else {
|
// } else {
|
||||||
totalPoints = '0';
|
// totalPoints = '0';
|
||||||
}
|
// }
|
||||||
|
|
||||||
isLoading = false;
|
// isLoading = false;
|
||||||
update();
|
// update();
|
||||||
}
|
// }
|
||||||
|
|
||||||
late String paymentID;
|
late String paymentID;
|
||||||
Future addDriverPayment(String paymentMethod, amount) async {
|
Future addDriverPayment(String paymentMethod, amount) async {
|
||||||
@@ -123,9 +123,9 @@ class CaptainWalletController extends GetxController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
getCaptainWalletFromRide();
|
// getCaptainWalletFromRide();
|
||||||
getCaptainWalletFromBuyPoints();
|
// getCaptainWalletFromBuyPoints();
|
||||||
checkAccountCaptainBank();
|
// checkAccountCaptainBank();
|
||||||
super.onInit();
|
super.onInit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,9 +111,11 @@ class PointsPageForRider extends StatelessWidget {
|
|||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(mapPassengerController
|
Text(index > 0
|
||||||
.currentLocationStringAll[index]
|
? mapPassengerController
|
||||||
.toString()),
|
.currentLocationStringAll[index]
|
||||||
|
.toString()
|
||||||
|
: ''),
|
||||||
const Icon(
|
const Icon(
|
||||||
Icons.reorder,
|
Icons.reorder,
|
||||||
size: 20,
|
size: 20,
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ class PointsCaptain extends StatelessWidget {
|
|||||||
'visa', pricePoint);
|
'visa', pricePoint);
|
||||||
await captainWalletController.addDriverWallet(
|
await captainWalletController.addDriverWallet(
|
||||||
'visa', countPoint);
|
'visa', countPoint);
|
||||||
await captainWalletController
|
// await captainWalletController
|
||||||
.getCaptainWalletFromBuyPoints();
|
// .getCaptainWalletFromBuyPoints();
|
||||||
});
|
});
|
||||||
}, //51524
|
}, //51524
|
||||||
),
|
),
|
||||||
@@ -69,8 +69,8 @@ class PointsCaptain extends StatelessWidget {
|
|||||||
'visa', pricePoint);
|
'visa', pricePoint);
|
||||||
await captainWalletController.addDriverWallet(
|
await captainWalletController.addDriverWallet(
|
||||||
'visa', countPoint);
|
'visa', countPoint);
|
||||||
await captainWalletController
|
// await captainWalletController
|
||||||
.getCaptainWalletFromBuyPoints();
|
// .getCaptainWalletFromBuyPoints();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -83,7 +83,7 @@ class PointsCaptain extends StatelessWidget {
|
|||||||
'visa', pricePoint);
|
'visa', pricePoint);
|
||||||
await captainWalletController.addDriverWallet(
|
await captainWalletController.addDriverWallet(
|
||||||
'visa', countPoint);
|
'visa', countPoint);
|
||||||
await captainWalletController.getCaptainWalletFromBuyPoints();
|
// await captainWalletController.getCaptainWalletFromBuyPoints();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ class WalletCaptain extends StatelessWidget {
|
|||||||
isleading: true,
|
isleading: true,
|
||||||
action: InkWell(
|
action: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
captainWalletController.getCaptainWalletFromBuyPoints();
|
// captainWalletController.getCaptainWalletFromBuyPoints();
|
||||||
},
|
},
|
||||||
child: const Icon(Icons.refresh)),
|
child: const Icon(Icons.refresh)),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class OrderHistory extends StatelessWidget {
|
|||||||
zoom: 15,
|
zoom: 15,
|
||||||
),
|
),
|
||||||
zoomControlsEnabled: true,
|
zoomControlsEnabled: true,
|
||||||
liteModeEnabled: true,
|
// liteModeEnabled: false,
|
||||||
polylines: {
|
polylines: {
|
||||||
Polyline(
|
Polyline(
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user