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

View File

@@ -11,6 +11,7 @@ import '../../../controller/payment/payment_controller.dart';
import '../../../main.dart'; import '../../../main.dart';
import '../../widgets/elevated_btn.dart'; import '../../widgets/elevated_btn.dart';
import '../../widgets/my_scafold.dart'; import '../../widgets/my_scafold.dart';
import '../../widgets/my_textField.dart';
import 'passenger_wallet_dialoge.dart'; import 'passenger_wallet_dialoge.dart';
class PassengerWallet extends StatelessWidget { class PassengerWallet extends StatelessWidget {
@@ -62,11 +63,49 @@ class PassengerWallet extends StatelessWidget {
bottom: Get.height * .2, bottom: Get.height * .2,
left: Get.width * .2, left: Get.width * .2,
right: Get.width * .2, right: Get.width * .2,
child: MyElevatedButton( child: Column(
title: 'Show Promos to Charge'.tr, children: [
onPressed: () { MyElevatedButton(
controller.changePromoSheetDialogue(); 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(), const PassengerWalletDialog(),

View File

@@ -79,7 +79,7 @@ class PassengerWalletDialog extends StatelessWidget {
Radio( Radio(
value: value:
box.read(BoxName.countryCode) == 'Egypt' box.read(BoxName.countryCode) == 'Egypt'
? 200 ? 210
: 20, : 20,
groupValue: controller.selectedAmount, groupValue: controller.selectedAmount,
onChanged: (value) { onChanged: (value) {
@@ -89,7 +89,7 @@ class PassengerWalletDialog extends StatelessWidget {
), ),
Text( Text(
box.read(BoxName.countryCode) == 'Egypt' box.read(BoxName.countryCode) == 'Egypt'
? '200 ${'LE'.tr} '.tr ? '${'200 ${'LE'.tr} '.tr} = 205 ${'LE'.tr}'
: '20 ${'JOD'.tr}'.tr, : '20 ${'JOD'.tr}'.tr,
style: AppStyle.title, style: AppStyle.title,
), ),
@@ -104,7 +104,7 @@ class PassengerWalletDialog extends StatelessWidget {
Radio( Radio(
value: value:
box.read(BoxName.countryCode) == 'Egypt' box.read(BoxName.countryCode) == 'Egypt'
? 400 ? 415
: 40, : 40,
groupValue: controller.selectedAmount, groupValue: controller.selectedAmount,
onChanged: (value) { onChanged: (value) {
@@ -114,7 +114,7 @@ class PassengerWalletDialog extends StatelessWidget {
), ),
Text( Text(
box.read(BoxName.countryCode) == 'Egypt' box.read(BoxName.countryCode) == 'Egypt'
? '400 ${'LE'.tr} '.tr ? '${'400 ${'LE'.tr} '.tr} = 415 ${'LE'.tr}'
: '40 ${'JOD'.tr}'.tr, : '40 ${'JOD'.tr}'.tr,
style: AppStyle.title, style: AppStyle.title,
), ),
@@ -129,7 +129,7 @@ class PassengerWalletDialog extends StatelessWidget {
Radio( Radio(
value: value:
box.read(BoxName.countryCode) == 'Egypt' box.read(BoxName.countryCode) == 'Egypt'
? 1000 ? 1100
: 50, : 50,
groupValue: controller.selectedAmount, groupValue: controller.selectedAmount,
onChanged: (value) { onChanged: (value) {
@@ -139,7 +139,7 @@ class PassengerWalletDialog extends StatelessWidget {
), ),
Text( Text(
box.read(BoxName.countryCode) == 'Egypt' box.read(BoxName.countryCode) == 'Egypt'
? '1000 ${'LE'.tr} '.tr ? '${'1000 ${'LE'.tr} '.tr} = 1100 ${'LE'.tr}'
: '50 ${'JOD'.tr}'.tr, : '50 ${'JOD'.tr}'.tr,
style: AppStyle.title, style: AppStyle.title,
), ),