25-10-9/1
This commit is contained in:
@@ -338,68 +338,69 @@ void showPaymentOptions(BuildContext context, PaymentController controller) {
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
Get.defaultDialog(
|
||||
barrierDismissible: false,
|
||||
title: 'Insert Wallet phone number'.tr,
|
||||
content: Form(
|
||||
key: controller.formKey,
|
||||
child: MyTextForm(
|
||||
controller: controller.walletphoneController,
|
||||
label: 'Insert Wallet phone number'.tr,
|
||||
hint: '963941234567',
|
||||
type: TextInputType.phone)),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'OK'.tr,
|
||||
onPressed: () async {
|
||||
Get.back();
|
||||
if (controller.formKey.currentState!.validate()) {
|
||||
if (controller.selectedAmount != 0) {
|
||||
controller.isLoading = true;
|
||||
controller.update();
|
||||
box.write(BoxName.phoneWallet,
|
||||
(controller.walletphoneController.text));
|
||||
Get.back();
|
||||
await controller.payWithMTNWallet(
|
||||
context,
|
||||
controller.selectedAmount.toString(),
|
||||
'SYP',
|
||||
);
|
||||
await controller.getPassengerWallet();
|
||||
// GestureDetector(
|
||||
// onTap: () async {
|
||||
// Get.back();
|
||||
// Get.defaultDialog(
|
||||
// barrierDismissible: false,
|
||||
// title: 'Insert Wallet phone number'.tr,
|
||||
// content: Form(
|
||||
// key: controller.formKey,
|
||||
// child: MyTextForm(
|
||||
// controller: controller.walletphoneController,
|
||||
// label: 'Insert Wallet phone number'.tr,
|
||||
// hint: '963941234567',
|
||||
// type: TextInputType.phone)),
|
||||
// confirm: MyElevatedButton(
|
||||
// title: 'OK'.tr,
|
||||
// onPressed: () async {
|
||||
// Get.back();
|
||||
// if (controller.formKey.currentState!.validate()) {
|
||||
// if (controller.selectedAmount != 0) {
|
||||
// controller.isLoading = true;
|
||||
// controller.update();
|
||||
// box.write(BoxName.phoneWallet,
|
||||
// (controller.walletphoneController.text));
|
||||
// Get.back();
|
||||
// await controller.payWithMTNWallet(
|
||||
// context,
|
||||
// controller.selectedAmount.toString(),
|
||||
// 'SYP',
|
||||
// );
|
||||
// await controller.getPassengerWallet();
|
||||
|
||||
// controller.isLoading = false;
|
||||
// controller.update();
|
||||
// } else {
|
||||
// Toast.show(
|
||||
// context,
|
||||
// '⚠️ You need to choose an amount!'.tr,
|
||||
// AppColor.redColor,
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }));
|
||||
// },
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Text(
|
||||
// 'Pay by MTN Wallet'.tr,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// const SizedBox(width: 10),
|
||||
// Image.asset(
|
||||
// 'assets/images/cashMTN.png',
|
||||
// width: 70,
|
||||
// height: 70,
|
||||
// fit: BoxFit.contain,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// )),
|
||||
|
||||
controller.isLoading = false;
|
||||
controller.update();
|
||||
} else {
|
||||
Toast.show(
|
||||
context,
|
||||
'⚠️ You need to choose an amount!'.tr,
|
||||
AppColor.redColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
}));
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Pay by MTN Wallet'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Image.asset(
|
||||
'assets/images/cashMTN.png',
|
||||
width: 70,
|
||||
height: 70,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
@@ -420,7 +421,7 @@ void showPaymentOptions(BuildContext context, PaymentController controller) {
|
||||
if (controller.formKey.currentState!.validate()) {
|
||||
box.write(BoxName.phoneWallet,
|
||||
controller.walletphoneController.text);
|
||||
await controller.payWithSyriaTelWallet(context,
|
||||
await controller.payWithSyriaTelWallet(
|
||||
controller.selectedAmount.toString(), 'SYP');
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user