25-4-29/1

This commit is contained in:
Hamza-Ayed
2025-04-29 15:36:15 +03:00
parent 0126011f0e
commit 801f26eb18
19 changed files with 416 additions and 401 deletions

View File

@@ -243,18 +243,17 @@ void showPaymentOptions(BuildContext context, PaymentController controller) {
box.read(BoxName.countryCode) == 'Egypt'
? CupertinoActionSheetAction(
child: Text('💳 Pay with Credit Card'.tr),
onPressed: () {
onPressed: () async {
if (controller.selectedAmount != 0) {
controller.payWithPayMob(
context,
controller.selectedAmount.toString(),
box.read(BoxName.countryCode) == 'Egypt' ? 'EGP' : 'JOD',
() async {
await controller.addPassengerWallet();
controller.changePromoSheetDialogue();
await controller.getPassengerWallet();
},
// () async {
// await controller.addPassengerWallet();
// controller.changePromoSheetDialogue();
);
await controller.getPassengerWallet();
} else {
Toast.show(context, '⚠️ You need to choose an amount!'.tr,
AppColor.redColor);
@@ -278,7 +277,7 @@ void showPaymentOptions(BuildContext context, PaymentController controller) {
box.read(BoxName.phoneWallet) != null
? CupertinoActionSheetAction(
child: Text('💰 Pay with Wallet'.tr),
onPressed: () {
onPressed: () async {
if (controller.selectedAmount != 0) {
controller.isLoading = true;
controller.update();
@@ -286,12 +285,8 @@ void showPaymentOptions(BuildContext context, PaymentController controller) {
context,
controller.selectedAmount.toString(),
box.read(BoxName.countryCode) == 'Egypt' ? 'EGP' : 'JOD',
() async {
await controller.addPassengerWallet();
controller.changePromoSheetDialogue();
await controller.getPassengerWallet();
},
);
await controller.getPassengerWallet();
controller.isLoading = false;
controller.update();
} else {