This commit is contained in:
Hamza-Ayed
2024-07-03 02:54:06 +03:00
parent b271101979
commit a1e4325988
11 changed files with 366 additions and 179 deletions

6
.env
View File

@@ -35,7 +35,7 @@ smsPasswordEgypt="J)Vh=qb/@MXrXlBl"
chatGPTkeySeferNew4=zg-vlie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl chatGPTkeySeferNew4=zg-vlie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl
anthropicAIkeySeferNew=zg-qbc-qvo39-n4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl anthropicAIkeySeferNew=zg-qbc-qvo39-n4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl
llama3Key=kzg_uTXy3e9DBbCQ1FnMGxYwTKysx9US1burxJj4fFwOje4LZBUFKJS1XrXlBl llama3Key=kzg_uTXy3e9DBbCQ1FnMGxYwTKysx9US1burxJj4fFwOje4LZBUFKJS1XrXlBl
payMobOutClientSecrret='wcP2bUQBRYy254hjCJhNlOatefDzifNDnXRQSiu6UhhcXfZdyCyiBaUr9JQpI2mlIkKVRyoNliuBv1P8QZPLveiZrUeYBLmS6wuVhbQEJku1B5MHhgbB0AboqaOMpqBcXrXlBl' payMobOutClientSecrret='xyjjRlahJM0Xc38WjApCOh8bvgL9slFpNdM9YeCu9AhLqboKMPtmSvc2N9O4tXxFLV2JAV6stBSTAGFGCVubGe6MNpc7MzJnZ3SiT6GpavBoCLWkUvVbdSDaM0zHvuBOXrXlBl'
payMobOutClient_id='gnBTH5kGzR4RGPwzEUxIKCJx9SA5zAwpXiX4vaiTXrXlBl' payMobOutClient_id='Z05ut48dVkS2gI2zenFFcKsfDKfHAU0WELqKyJ0LXrXlBl'
payMobOutPassword='#f9vZtxHdIGvAbl5wWMQkvgZTXrXlBl' payMobOutPassword='D2zJFxkE#LN3vz38z2dYxpNfWXrXlBl'
payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl' payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl'

View File

@@ -110,8 +110,8 @@ class FirebaseMessagesController extends GetxController {
'body': message.notification!.body 'body': message.notification!.body
}); });
} else if (message.notification!.title == 'Cancel Trip'.tr) { } else if (message.notification!.title == 'Cancel Trip'.tr) {
// NotificationController().showNotification( NotificationController().showNotification(
// 'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'cancel'); 'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'cancel');
cancelTripDialog(); cancelTripDialog();
} else if (message.notification!.title! == 'token change'.tr) { } else if (message.notification!.title! == 'token change'.tr) {
// NotificationController() // NotificationController()

View File

@@ -156,44 +156,46 @@ class AI extends GetxController {
), ),
], ],
); );
} else if (responseCriminalRecordEgypt['FullName'] != }
responseIdEgyptDriverLicense['name_arabic']) { // else if (responseCriminalRecordEgypt['FullName'] !=
Get.defaultDialog( // responseIdEgyptDriverLicense['name_arabic']) {
barrierDismissible: false, // Get.defaultDialog(
title: 'Criminal Record Mismatch', // barrierDismissible: false,
content: Column( // title: 'Criminal Record Mismatch',
mainAxisSize: MainAxisSize.min, // content: Column(
children: [ // mainAxisSize: MainAxisSize.min,
const Icon(Icons.warning, size: 48, color: Colors.red), // children: [
const SizedBox(height: 16), // const Icon(Icons.warning, size: 48, color: Colors.red),
Text( // const SizedBox(height: 16),
'The full name on your criminal record does not match the one on your drivers license. Please verify and provide the correct documents.' // Text(
.tr, // 'The full name on your criminal record does not match the one on your drivers license. Please verify and provide the correct documents.'
textAlign: TextAlign.center, // .tr,
style: AppStyle.title, // textAlign: TextAlign.center,
), // style: AppStyle.title,
const SizedBox(height: 16), // ),
IconButton( // const SizedBox(height: 16),
onPressed: () async { // IconButton(
await Get.find<TextToSpeechController>().speakText( // onPressed: () async {
'The full name on your criminal record does not match the one on your drivers license. Please verify and provide the correct documents.' // await Get.find<TextToSpeechController>().speakText(
.tr, // 'The full name on your criminal record does not match the one on your drivers license. Please verify and provide the correct documents.'
); // .tr,
}, // );
icon: const Icon(Icons.volume_up), // },
), // icon: const Icon(Icons.volume_up),
], // ),
), // ],
actions: [ // ),
TextButton( // actions: [
onPressed: () { // TextButton(
Get.back(); // onPressed: () {
}, // Get.back();
child: const Text('OK'), // },
), // child: const Text('OK'),
], // ),
); // ],
} else { // );
// }
else {
await addDriverEgypt(); await addDriverEgypt();
await addRegistrationCarEgypt(); await addRegistrationCarEgypt();
@@ -234,7 +236,7 @@ class AI extends GetxController {
var status = responseIdEgyptBack['fullName'] ?? ''; var status = responseIdEgyptBack['fullName'] ?? '';
var birthdate = responseIdEgyptFront['dob'] != null var birthdate = responseIdEgyptFront['dob'] != null
? DateTime.parse(responseIdEgyptFront['dob'] + '-01-01').toString() ? DateTime.parse(responseIdEgyptFront['dob'] + '-01-01').toString()
: ''; : '1960-01-01';
var maritalStatus = responseIdEgyptBack['maritalStatus'] ?? ''; var maritalStatus = responseIdEgyptBack['maritalStatus'] ?? '';
var site = responseIdEgyptDriverLicense['address'] ?? ''; var site = responseIdEgyptDriverLicense['address'] ?? '';

View File

@@ -24,6 +24,8 @@ import '../../functions/location_controller.dart';
class MapDriverController extends GetxController { class MapDriverController extends GetxController {
bool isLoading = true; bool isLoading = true;
final formKey1 = GlobalKey<FormState>(); final formKey1 = GlobalKey<FormState>();
final formKey2 = GlobalKey<FormState>();
final messageToPassenger = TextEditingController();
final sosEmergincyNumberCotroller = TextEditingController(); final sosEmergincyNumberCotroller = TextEditingController();
List data = []; List data = [];
List dataDestination = []; List dataDestination = [];

View File

@@ -29,8 +29,7 @@ class PaymobPayout extends GetxController {
'client_secret': AK.payMobOutClientSecrret 'client_secret': AK.payMobOutClientSecrret
}; };
var res = await http.post( var res = await http.post(
Uri.parse( Uri.parse('https://payouts.paymobsolutions.com/api/secure/o/token/'),
'https://stagingpayouts.paymobsolutions.com/api/secure/o/token/'),
headers: headers, headers: headers,
body: body, body: body,
); );
@@ -55,8 +54,7 @@ class PaymobPayout extends GetxController {
"msisdn": msisdn, // "01023456789" "msisdn": msisdn, // "01023456789"
}); });
var res = await http.post( var res = await http.post(
Uri.parse( Uri.parse('https://paymobsolutions.com/api/secure/disburse/'),
'https://stagingpayouts.paymobsolutions.com/api/secure/disburse/'),
headers: headers, headers: headers,
body: body, body: body,
); );
@@ -131,8 +129,7 @@ class PaymobPayout extends GetxController {
}; };
var res = await http var res = await http
.post( .post(
Uri.parse( Uri.parse('https://paymobsolutions.com/api/secure/disburse/'),
'https://stagingpayouts.paymobsolutions.com/api/secure/disburse/'),
headers: headers, headers: headers,
body: body, body: body,
) )

View File

@@ -4,61 +4,60 @@ class MyTranslation extends Translations {
@override @override
Map<String, Map<String, String>> get keys => { Map<String, Map<String, String>> get keys => {
"ar": { "ar": {
'Cost Of Trip IS ': "تكلفة الرحلة هي",
'message From passenger': "رسالة من الراكب",
"Where are you, sir?": "أنا وصلت حضرتك فين.",
"I've been trying to reach you but your phone is off.":
"بحاول أكلمك التلفون مغلق.",
"Please don't be late": "أرجو عدم التأخير",
"Please don't be late, I'm waiting for you at the specified location.":
"أرجو عدم التأخير، أنا منتظرك على ال لوكيشن المحدد.",
"You must be recharge your Account": "You must be recharge your Account":
"رصيد حسابك غير كافٍ. يرجى إعادة الشحن للمتابعة", "رصيد حسابك غير كافٍ. يرجى إعادة الشحن للمتابعة",
"Commercial International Bank (CIB)": "البنك التجاري الدولي (CIB)", "Ahli United Bank": "البنك الأهلي المتحد",
"National Bank of Egypt": "البنك الأهلي المصري", "Citi Bank N.A. Egypt": "سيتي بنك مصر",
"Qatar National Bank (QNB Alahli)": "بنك قطر الوطني (QNB الأهلي)", "MIDBANK": "بنك ميد",
"Banque Du Caire": "بنك القاهرة",
"HSBC Bank Egypt S.A.E": "اتش اس بي سي",
"Credit Agricole Egypt S.A.E": "كريدي أجريكول مصر",
"Egyptian Gulf Bank": "البنك المصري الخليجي",
"The United Bank": "البنك المتحد",
"Qatar National Bank Alahli": "البنك الأهلي القطري",
"Arab Bank PLC": "البنك العربي",
"Emirates National Bank of Dubai": "بنك الإمارات دبي الوطني",
"Al Ahli Bank of Kuwait Egypt": "البنك الأهلي الكويتي - مصر",
"National Bank of Kuwait Egypt": "البنك الوطني الكويتي - مصر",
"Arab Banking Corporation - Egypt S.A.E":
"الشركة العربية المصرفية - مصر",
"First Abu Dhabi Bank": "بنك أبوظبي الأول",
"Abu Dhabi Islamic Bank Egypt": "مصرف أبوظبي الإسلامي - مصر",
"Commercial International Bank - Egypt S.A.E":
"البنك التجاري الدولي - مصر",
"Housing And Development Bank": "بنك الإسكان والتعمير",
"Banque Misr": "بنك مصر", "Banque Misr": "بنك مصر",
"AlexBank": "بنك الإسكندرية", "Arab African International Bank": "البنك العربي الأفريقي الدولي",
"Banque du Caire (BDC)": "بنك القاهرة", "Egyptian Arab Land Bank": "البنك المصري العربي",
"HSBC Bank Egypt": "بنك HSBC مصر", "Export Development Bank of Egypt": "بنك التنمية والتصدير المصري",
"Faisal Islamic Bank of Egypt (FAIB)": "بنك فيصل الإسلامي المصري", "Faisal Islamic Bank of Egypt": "البنك الإسلامي المصري",
"Arab African International Bank (AAIB)": "Blom Bank": "بلوم بنك",
"البنك العربي الأفريقي الدولي", "Abu Dhabi Commercial Bank Egypt": "بنك أبوظبي التجاري - مصر",
"Export Development Bank of Egypt (EDBE)": "Alex Bank Egypt": "بنك الإسكندرية",
"بنك تنمية الصادرات المصري", "Societe Arabe Internationale De Banque": "البنك العربي الدولي",
"Industrial Development Bank of Egypt (IDB)": "National Bank of Egypt": "البنك الأهلي المصري",
"بنك التنمية الصناعية المصري", "Al Baraka Bank Egypt B.S.C.": "بنك البركة مصر",
"Suez Canal Bank (SCB)": "بنك قناة السويس", "Egypt Post": "البريد المصري",
"Bank Audi Egypt": "بنك عوده مصر", "Nasser Social Bank": "بنك ناصر الاجتماعي",
"Union National Bank Egypt": "بنك الاتحاد الوطني مصر", "Industrial Development Bank": "بنك التنمية الصناعية والعمال",
"Al Baraka Bank Egypt": "بنك البركة مصر", "Suez Canal Bank": "بنك قناة السويس",
"Blom Bank (BBE)": "بنك بلوم مصر", "Mashreq Bank": "بنك المشرق",
"Crédit Agricole Egypt (CAE)": "بنك كريدي أجريكول مصر", "Arab Investment Bank": "البنك العربي للاستثمار",
"Egyptian Gulf Bank (EG Bank)": "بنك الخليج المصري", "General Authority For Supply Commodities":
"Housing and Development Bank (HDB)": "بنك التعمير والإسكان", "الهيئة العامة للسلع التموينية",
"The United Bank of Egypt (UB)": "البنك المتحد مصر", "Arab International Bank": "البنك العربي الدولي",
"Arab Bank Plc. (ARAB)": "البنك العربي ش.م.ع.", "Agricultural Bank of Egypt": "البنك الزراعي المصري",
"Emirates NBD (ENBD)": "بنك الإمارات دبي الوطني", "National Bank of Greece": "البنك الوطني اليوناني",
"Al Ahli Bank of Kuwait - Egypt (ABK-Egypt)": "Central Bank Of Egypt": "البنك المركزي المصري",
"البنك الأهلي الكويتي - مصر", "ATTIJARIWAFA BANK Egypt": "البنك التجاري وفا مصر",
"National Bank of Kuwait - Egypt (NBK-Egypt)":
"بنك الكويت الوطني - مصر",
"Arab Banking Corporation (Bank ABC)":
"مؤسسة التمويل العربي (بنك ABC)",
"First Abu Dhabi Bank (FAB)": "بنك أبوظبي الأول",
"Abu Dhabi Islamic Bank (ADIB)": "بنك أبوظبي الإسلامي",
"Egyptian Arab Land Bank (EALB)": "بنك التعمير العربي المصري",
"Abu Dhabi Commercial Bank - Egypt (ADCB)":
"بنك أبوظبي التجاري - مصر",
"Bank of Alexandria (BOA)": "بنك الإسكندرية",
"Société Arabe Internationale de Banque (SAIB)":
"البنك العربي الدولي للتجارة (SAIB)",
"Attijariwafa Bank Egypt (ABRK)": "بنك التجاري وفا مصر",
"Principal Bank for Development and Agricultural Credit (POST)":
"البنك الرئيسي للتنمية والائتمان الزراعي",
"Nasser Social Bank (NSB)": "بنك ناصر الاجتماعي",
"Mashreq Bank (MASH)": "بنك المشرق",
"Arab International Bank (AIB)": "البنك العربي الدولي",
"General Authority for Suez Canal Economic Zone (GASC)":
"الهيئة العامة للمنطقة الاقتصادية لقناة السويس",
"Arab Investment Bank (AIBK)": "بنك الاستثمار العربي (AIBK)",
"Piraeus Bank (PDAC)": "بنك بيريوس",
"National Bank of Greece (ceased operations in Egypt)":
"البنك الوطني اليوناني (توقف عن العمل في مصر)",
"Central Bank of Egypt (CBE)": "البنك المركزي المصري",
"Barclays Egypt (BBE)": "بنك باركليز مصر",
"Morning Promo": "عرض الصباح", "Morning Promo": "عرض الصباح",
"this is count of your all trips in the morning promo today from 7:00am-10:00am": "this is count of your all trips in the morning promo today from 7:00am-10:00am":
"هذا عدد جميع رحلاتك في عرض الصباح اليوم من الساعة 7:00 صباحًا حتى 10:00 صباحًا", "هذا عدد جميع رحلاتك في عرض الصباح اليوم من الساعة 7:00 صباحًا حتى 10:00 صباحًا",

View File

@@ -44,9 +44,11 @@ class EgyptCardAI extends StatelessWidget {
controller.responseIdEgyptFront.isNotEmpty && controller.responseIdEgyptFront.isNotEmpty &&
controller.responseIdEgyptBack.isNotEmpty && controller.responseIdEgyptBack.isNotEmpty &&
controller controller
.responseIdEgyptDriverLicense.isNotEmpty && .responseIdEgyptDriverLicense.isNotEmpty
controller // &&
.responseCriminalRecordEgypt.isNotEmpty) // controller
// .responseCriminalRecordEgypt.isNotEmpty
)
? MyElevatedButton( ? MyElevatedButton(
title: 'Next'.tr, title: 'Next'.tr,
onPressed: () { onPressed: () {
@@ -64,9 +66,11 @@ class EgyptCardAI extends StatelessWidget {
controller controller
.responseIdEgyptBack.isNotEmpty && .responseIdEgyptBack.isNotEmpty &&
controller.responseIdEgyptDriverLicense controller.responseIdEgyptDriverLicense
.isNotEmpty && .isNotEmpty
controller.responseCriminalRecordEgypt // &&
.isNotEmpty) // controller.responseCriminalRecordEgypt
// .isNotEmpty
)
? Get.height * .7 ? Get.height * .7
: Get.height * .85, : Get.height * .85,
child: ListView( child: ListView(
@@ -662,13 +666,23 @@ Important notes:
IconButton( IconButton(
onPressed: () async { onPressed: () async {
ai.allMethodForAI(""" ai.allMethodForAI("""
Extract the following fields from the provided text and create a JSON object with these keys: Extract the following details from the provided car license data and format them into a JSON object:
License Expiration Date
Car Plate
Owner
Address
Car License Data:
JSON Format:
{ {
"LicenseExpirationDate": "", // Format: YYYY-MM-DD "LicenseExpirationDate": "YYYY-MM-DD",
"car_plate": "", "car_plate": "[Car plate number]",//the car plate is line next to line contain 'ادارة مرور' for bot numbers and letters in arabic with partition like| but you remove |
"owner": "", "owner": "[Owner's full name]",
"address": "" "address": "[Address if available, otherwise 'Not provided']"
} }
Important notes: Important notes:
@@ -723,13 +737,23 @@ Please fill in the JSON object with the extracted information, following these g
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
ai.allMethodForAI(""" ai.allMethodForAI("""
Extract the following fields from the provided text and create a JSON object with these keys: Extract the following details from the provided car license data and format them into a JSON object:
License Expiration Date
Car Plate
Owner
Address
Car License Data:
JSON Format:
{ {
"LicenseExpirationDate": "", // Format: YYYY-MM-DD "LicenseExpirationDate": "YYYY-MM-DD",
"car_plate": "", "car_plate": "[Car plate number]",//the car plate is line next to line contain 'ادارة مرور' for bot numbers and letters in arabic with partition like| but you remove |
"owner": "", "owner": "[Owner's full name]",
"address": "" "address": "[Address if available, otherwise 'Not provided']"
} }
Important notes: Important notes:

View File

@@ -167,7 +167,20 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
// borderRadius: BorderRadius.circular(15)), // borderRadius: BorderRadius.circular(15)),
// child: IconButton( // child: IconButton(
// onPressed: () { // onPressed: () {
// launchCommunication('phone', '+201023248456', ''); // AC credentials = AC();
// String apiKey = '';
// String convertedStringN = credentials.c(
// credentials.c(credentials.c(apiKey, cs), cC), cn);
//
// String retrievedStringS = credentials.r(
// credentials.r(credentials.r(convertedStringN, cn), cC),
// cs);
// //
// if (retrievedStringS == apiKey) {
// print('convertedStringN --- $convertedStringN');
// print('retrievedStringS ---$retrievedStringS');
// print('same');
// }
// }, // },
// icon: const Icon( // icon: const Icon(
// FontAwesome5.grin_tears, // FontAwesome5.grin_tears,

View File

@@ -1,3 +1,4 @@
import 'package:SEFER/views/widgets/my_textField.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart'; import 'package:flutter_font_icons/flutter_font_icons.dart';
@@ -91,17 +92,17 @@ class PassengerInfoWindow extends StatelessWidget {
AppStyle.title, AppStyle.title,
content: SizedBox( content: SizedBox(
height: Get.height * .5, height: Get.height * .5,
child: Column( child: ListView(
mainAxisAlignment: // mainAxisAlignment:
MainAxisAlignment // MainAxisAlignment
.spaceEvenly, // .spaceEvenly,
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
FirebaseMessagesController().sendNotificationToAnyWithoutData( FirebaseMessagesController().sendNotificationToAnyWithoutData(
'message From Driver' 'message From Driver'
.tr, .tr,
"There's heavy traffic here. Can you suggest an alternate pickup point?" "Where are you, sir?"
.tr, .tr,
controller controller
.tokenPassenger, .tokenPassenger,
@@ -117,7 +118,7 @@ class PassengerInfoWindow extends StatelessWidget {
.all( .all(
10), 10),
child: Text( child: Text(
"There's heavy traffic here. Can you suggest an alternate pickup point?" "Where are you, sir?"
.tr, .tr,
style: AppStyle style: AppStyle
.title, .title,
@@ -125,12 +126,15 @@ class PassengerInfoWindow extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(
height: 5,
),
InkWell( InkWell(
onTap: () { onTap: () {
FirebaseMessagesController().sendNotificationToAnyWithoutData( FirebaseMessagesController().sendNotificationToAnyWithoutData(
'message From Driver' 'message From Driver'
.tr, .tr,
"Heading your way now. Please be ready." "I've been trying to reach you but your phone is off."
.tr, .tr,
controller controller
.tokenPassenger, .tokenPassenger,
@@ -146,7 +150,7 @@ class PassengerInfoWindow extends StatelessWidget {
.all( .all(
10), 10),
child: Text( child: Text(
"Heading your way now. Please be ready." "I've been trying to reach you but your phone is off."
.tr, .tr,
style: AppStyle style: AppStyle
.title, .title,
@@ -154,12 +158,15 @@ class PassengerInfoWindow extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(
height: 5,
),
InkWell( InkWell(
onTap: () { onTap: () {
FirebaseMessagesController().sendNotificationToAnyWithoutData( FirebaseMessagesController().sendNotificationToAnyWithoutData(
'message From Driver' 'message From Driver'
.tr, .tr,
'Approaching your area. Should be there in 3 minutes.' "Please don't be late, I'm waiting for you at the specified location."
.tr, .tr,
controller controller
.tokenPassenger, .tokenPassenger,
@@ -175,7 +182,7 @@ class PassengerInfoWindow extends StatelessWidget {
.all( .all(
10), 10),
child: Text( child: Text(
'Approaching your area. Should be there in 3 minutes.' "Please don't be late, I'm waiting for you at the specified location."
.tr, .tr,
style: AppStyle style: AppStyle
.title, .title,
@@ -183,6 +190,81 @@ class PassengerInfoWindow extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(
height: 5,
),
InkWell(
onTap: () {
FirebaseMessagesController().sendNotificationToAnyWithoutData(
'message From Driver'
.tr,
"Please don't be late"
.tr,
controller
.tokenPassenger,
'ding.wav');
Get.back();
},
child: Container(
decoration: AppStyle
.boxDecoration1,
child: Padding(
padding:
const EdgeInsets
.all(
10),
child: Text(
"Please don't be late"
.tr,
style: AppStyle
.title,
),
),
),
),
const SizedBox(
height: 5,
),
SizedBox(
width: 335,
child: Row(
mainAxisAlignment:
MainAxisAlignment
.center,
children: [
Form(
key: controller
.formKey2,
child:
SizedBox(
width:
300,
child: MyTextForm(
controller:
controller.messageToPassenger,
label: 'Type Any thing'.tr,
hint: 'Type Any thing'.tr,
type: TextInputType.name),
)),
IconButton(
onPressed:
() {
FirebaseMessagesController().sendNotificationToAnyWithoutData(
'message From Driver'.tr,
controller.messageToPassenger.text,
controller.tokenPassenger,
'ding.wav');
controller
.messageToPassenger
.clear();
Get.back();
},
icon: const Icon(
Icons
.send))
],
),
)
], ],
), ),
)); ));

View File

@@ -185,6 +185,21 @@ class OrderRequestPage extends StatelessWidget {
double.parse(myList[2]).toStringAsFixed(2), double.parse(myList[2]).toStringAsFixed(2),
style: AppStyle.headTitle2, style: AppStyle.headTitle2,
), ),
AnimatedContainer(
duration: const Duration(seconds: 5),
curve: Curves.easeInOut,
child: AnimatedSize(
duration: const Duration(seconds: 5),
curve: Curves.easeInOut,
child: myList[31].toString() == 'Comfort'
? const Icon(
Icons.ac_unit,
color: AppColor.blueColor,
size: 50,
)
: const SizedBox(),
),
),
Text( Text(
myList[31].toString(), myList[31].toString(),
style: AppStyle.title style: AppStyle.title

View File

@@ -1,50 +1,52 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
class BankController extends GetxController { class BankController extends GetxController {
String selectedBank = ''; String selectedBank = '';
// Map<String, String> bankNames = {
// 'CIB Bank'.tr: 'CIB',
// 'National Bank of Egypt'.tr: 'NBE',
// 'QNB Al Ahli'.tr: 'QNB',
// 'Bank Misr'.tr: 'BM',
// // Add other bank full names and short names here
// };
Map<String, String> bankNames = { Map<String, String> bankNames = {
'Commercial International Bank (CIB)'.tr: 'CIB', 'Ahli United Bank'.tr: 'AUB',
'Citi Bank N.A. Egypt'.tr: 'CITI',
'MIDBANK'.tr: 'MIDB',
'Banque Du Caire'.tr: 'BDC',
'HSBC Bank Egypt S.A.E'.tr: 'HSBC',
'Credit Agricole Egypt S.A.E'.tr: 'ECAE',
'Egyptian Gulf Bank'.tr: 'EGB',
'The United Bank'.tr: 'UB',
'Qatar National Bank Alahli'.tr: 'QNB',
'Arab Bank PLC'.tr: 'ARAB',
'Emirates National Bank of Dubai'.tr: 'ENBD',
'Al Ahli Bank of Kuwait Egypt'.tr: 'ABK',
'National Bank of Kuwait Egypt'.tr: 'NBK',
'Arab Banking Corporation - Egypt S.A.E'.tr: 'EABC',
'First Abu Dhabi Bank'.tr: 'FAB',
'Abu Dhabi Islamic Bank Egypt'.tr: 'ADIB',
'Commercial International Bank - Egypt S.A.E'.tr: 'CIB',
'Housing And Development Bank'.tr: 'HDB',
'Banque Misr'.tr: 'MISR',
'Arab African International Bank'.tr: 'AAIB',
'Egyptian Arab Land Bank'.tr: 'EALB',
'Export Development Bank of Egypt'.tr: 'EDBE',
'Faisal Islamic Bank of Egypt'.tr: 'FAIB',
'Blom Bank'.tr: 'BLOM',
'Abu Dhabi Commercial Bank Egypt'.tr: 'ADCB',
'Alex Bank Egypt'.tr: 'BOA',
'Societe Arabe Internationale De Banque'.tr: 'SAIB',
'National Bank of Egypt'.tr: 'NBE', 'National Bank of Egypt'.tr: 'NBE',
'Qatar National Bank (QNB Alahli)'.tr: 'QNB', 'Al Baraka Bank Egypt B.S.C.'.tr: 'ABRK',
'Banque Misr'.tr: 'BM', 'Egypt Post'.tr: 'POST',
'Banque du Caire (BDC)'.tr: 'BDC', 'Nasser Social Bank'.tr: 'NSB',
'HSBC Bank Egypt'.tr: 'HSBC', 'Industrial Development Bank'.tr: 'IDB',
'Faisal Islamic Bank of Egypt (FAIB)'.tr: 'FAIB', 'Suez Canal Bank'.tr: 'SCB',
'Arab African International Bank (AAIB)'.tr: 'AAIB', 'Mashreq Bank'.tr: 'MASHA',
'Export Development Bank of Egypt (EDBE)'.tr: 'EDBE', 'Arab Investment Bank'.tr: 'AIB',
'Industrial Development Bank of Egypt (IDB)'.tr: 'IDB', 'General Authority For Supply Commodities'.tr: 'GASCA',
'Suez Canal Bank (SCB)'.tr: 'SCB', 'Arab International Bank'.tr: 'AIB',
'Bank Audi Egypt'.tr: 'BAE', 'Agricultural Bank of Egypt'.tr: 'PDAC',
'Union National Bank Egypt'.tr: 'UNB', 'National Bank of Greece'.tr: 'NBG',
'Al Baraka Bank Egypt'.tr: 'ABE', 'Central Bank Of Egypt'.tr: 'CBE',
'Egyptian Gulf Bank (EG Bank)'.tr: 'EGB', 'ATTIJARIWAFA BANK Egypt'.tr: 'BBE',
'Housing and Development Bank (HDB)'.tr: 'HDB',
'The United Bank of Egypt (UB)'.tr: 'UB',
'Emirates NBD (ENBD)'.tr: 'ENBD',
'Al Ahli Bank of Kuwait - Egypt (ABK-Egypt)'.tr: 'ABK',
'National Bank of Kuwait - Egypt (NBK-Egypt)'.tr: 'NBK',
'First Abu Dhabi Bank (FAB)'.tr: 'FAB',
'Abu Dhabi Islamic Bank (ADIB)'.tr: 'ADIB',
'Arab African International Bank (AAIB)'.tr: 'AAIB',
'Egyptian Arab Land Bank (EALB)'.tr: 'EALB',
'Faisal Islamic Bank of Egypt (FAIB)'.tr: 'FAIB',
'Blom Bank (BLOM)'.tr: 'BLOM',
'Abu Dhabi Commercial Bank - Egypt (ADCB)'.tr: 'ADCB',
'Nasser Social Bank (NSB)'.tr: 'NSB',
'Industrial Development Bank of Egypt (IDB)'.tr: 'IDB',
'Arab International Bank (AIB)'.tr: 'AIB',
'Arab Investment Bank (AIBK)'.tr: 'ARIB',
'Central Bank of Egypt (CBE)'.tr: 'CBE',
'Barclays Egypt (BBE)'.tr: 'BBE',
// Add other bank full names and short names here as needed
}; };
@override @override
@@ -66,6 +68,30 @@ class BankController extends GetxController {
); );
}).toList(); }).toList();
} }
void showBankPicker(BuildContext context) {
showCupertinoModalPopup(
context: context,
builder: (BuildContext context) => CupertinoActionSheet(
title: Text('Select a Bank'.tr),
actions: bankNames.keys.map((String bankFullName) {
return CupertinoActionSheetAction(
child: Text(bankFullName),
onPressed: () {
updateSelectedBank(bankNames[bankFullName]);
Navigator.pop(context);
},
);
}).toList(),
cancelButton: CupertinoActionSheetAction(
child: Text('Cancel'.tr),
onPressed: () {
Navigator.pop(context);
},
),
),
);
}
} }
class BankDropdown extends StatelessWidget { class BankDropdown extends StatelessWidget {
@@ -76,10 +102,37 @@ class BankDropdown extends StatelessWidget {
return GetBuilder<BankController>( return GetBuilder<BankController>(
init: bankController, init: bankController,
builder: (controller) { builder: (controller) {
return DropdownButton<String>( return CupertinoButton(
value: controller.selectedBank, padding: EdgeInsets.zero,
onChanged: controller.updateSelectedBank, onPressed: () => controller.showBankPicker(context),
items: controller.getDropdownItems(), child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
decoration: BoxDecoration(
border: Border.all(color: CupertinoColors.systemGrey4),
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
controller.selectedBank != null
? controller.bankNames.keys.firstWhere(
(key) =>
controller.bankNames[key] ==
controller.selectedBank,
orElse: () => 'Select a Bank'.tr,
)
: 'Select a Bank'.tr,
style: TextStyle(
color: controller.selectedBank != null
? CupertinoColors.black
: CupertinoColors.systemGrey,
),
),
const Icon(CupertinoIcons.chevron_down, size: 20),
],
),
),
); );
}, },
); );