diff --git a/lib/controller/local/translations.dart b/lib/controller/local/translations.dart index 527f840..a5a8b93 100644 --- a/lib/controller/local/translations.dart +++ b/lib/controller/local/translations.dart @@ -4,6 +4,7 @@ class MyTranslation extends Translations { @override Map> get keys => { "ar": { + "Add wallet phone you use": "أضف محفظة الهاتف التي تستخدمها", "Update Available": "تحديث متوفر", 'Phone number must be exactly 11 digits long': "رقم الهاتف يجب أن يكون بطول 11 رقماً", diff --git a/lib/views/home/my_wallet/passenger_wallet.dart b/lib/views/home/my_wallet/passenger_wallet.dart index d3e9f3c..29c5794 100644 --- a/lib/views/home/my_wallet/passenger_wallet.dart +++ b/lib/views/home/my_wallet/passenger_wallet.dart @@ -11,6 +11,7 @@ import '../../../controller/payment/payment_controller.dart'; import '../../../main.dart'; import '../../widgets/elevated_btn.dart'; import '../../widgets/my_scafold.dart'; +import '../../widgets/my_textField.dart'; import 'passenger_wallet_dialoge.dart'; class PassengerWallet extends StatelessWidget { @@ -62,11 +63,49 @@ class PassengerWallet extends StatelessWidget { bottom: Get.height * .2, left: Get.width * .2, right: Get.width * .2, - child: MyElevatedButton( - title: 'Show Promos to Charge'.tr, - onPressed: () { - controller.changePromoSheetDialogue(); - }, + child: Column( + children: [ + MyElevatedButton( + title: 'Show Promos to Charge'.tr, + onPressed: () { + controller.changePromoSheetDialogue(); + }, + ), + const SizedBox( + height: 20, + ), + MyElevatedButton( + kolor: AppColor.deepPurpleAccent, + title: "Add wallet phone you use".tr, + onPressed: () { + 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: 'Insert Wallet phone number'.tr, + type: TextInputType.phone)), + confirm: MyElevatedButton( + kolor: AppColor.greenColor, + title: 'OK'.tr, + onPressed: () async { + Get.back(); + box.write(BoxName.phoneWallet, + controller.walletphoneController.text); + }, + ), + cancel: MyElevatedButton( + title: 'Cancel'.tr, + kolor: AppColor.redColor, + onPressed: () { + Get.back(); + })); + }) + ], ), )), const PassengerWalletDialog(), diff --git a/lib/views/home/my_wallet/passenger_wallet_dialoge.dart b/lib/views/home/my_wallet/passenger_wallet_dialoge.dart index bb11e11..d9ae68d 100644 --- a/lib/views/home/my_wallet/passenger_wallet_dialoge.dart +++ b/lib/views/home/my_wallet/passenger_wallet_dialoge.dart @@ -79,7 +79,7 @@ class PassengerWalletDialog extends StatelessWidget { Radio( value: box.read(BoxName.countryCode) == 'Egypt' - ? 200 + ? 210 : 20, groupValue: controller.selectedAmount, onChanged: (value) { @@ -89,7 +89,7 @@ class PassengerWalletDialog extends StatelessWidget { ), Text( box.read(BoxName.countryCode) == 'Egypt' - ? '200 ${'LE'.tr} '.tr + ? '${'200 ${'LE'.tr} '.tr} = 205 ${'LE'.tr}' : '20 ${'JOD'.tr}'.tr, style: AppStyle.title, ), @@ -104,7 +104,7 @@ class PassengerWalletDialog extends StatelessWidget { Radio( value: box.read(BoxName.countryCode) == 'Egypt' - ? 400 + ? 415 : 40, groupValue: controller.selectedAmount, onChanged: (value) { @@ -114,7 +114,7 @@ class PassengerWalletDialog extends StatelessWidget { ), Text( box.read(BoxName.countryCode) == 'Egypt' - ? '400 ${'LE'.tr} '.tr + ? '${'400 ${'LE'.tr} '.tr} = 415 ${'LE'.tr}' : '40 ${'JOD'.tr}'.tr, style: AppStyle.title, ), @@ -129,7 +129,7 @@ class PassengerWalletDialog extends StatelessWidget { Radio( value: box.read(BoxName.countryCode) == 'Egypt' - ? 1000 + ? 1100 : 50, groupValue: controller.selectedAmount, onChanged: (value) { @@ -139,7 +139,7 @@ class PassengerWalletDialog extends StatelessWidget { ), Text( box.read(BoxName.countryCode) == 'Egypt' - ? '1000 ${'LE'.tr} '.tr + ? '${'1000 ${'LE'.tr} '.tr} = 1100 ${'LE'.tr}' : '50 ${'JOD'.tr}'.tr, style: AppStyle.title, ),