This commit is contained in:
Hamza-Ayed
2024-09-17 00:57:13 +03:00
parent 1b50de9a7c
commit a65e7e5562
3 changed files with 51 additions and 11 deletions

View File

@@ -4,6 +4,7 @@ class MyTranslation extends Translations {
@override
Map<String, Map<String, String>> get keys => {
"ar": {
"Add wallet phone you use": "أضف محفظة الهاتف التي تستخدمها",
"Update Available": "تحديث متوفر",
'Phone number must be exactly 11 digits long':
"رقم الهاتف يجب أن يكون بطول 11 رقماً",

View File

@@ -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,12 +63,50 @@ class PassengerWallet extends StatelessWidget {
bottom: Get.height * .2,
left: Get.width * .2,
right: Get.width * .2,
child: MyElevatedButton(
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(),
],

View File

@@ -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,
),