7/3/1
This commit is contained in:
6
.env
6
.env
@@ -35,7 +35,7 @@ smsPasswordEgypt="J)Vh=qb/@MXrXlBl"
|
||||
chatGPTkeySeferNew4=zg-vlie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl
|
||||
anthropicAIkeySeferNew=zg-qbc-qvo39-n4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl
|
||||
llama3Key=kzg_uTXy3e9DBbCQ1FnMGxYwTKysx9US1burxJj4fFwOje4LZBUFKJS1XrXlBl
|
||||
payMobOutClientSecrret='wcP2bUQBRYy254hjCJhNlOatefDzifNDnXRQSiu6UhhcXfZdyCyiBaUr9JQpI2mlIkKVRyoNliuBv1P8QZPLveiZrUeYBLmS6wuVhbQEJku1B5MHhgbB0AboqaOMpqBcXrXlBl'
|
||||
payMobOutClient_id='gnBTH5kGzR4RGPwzEUxIKCJx9SA5zAwpXiX4vaiTXrXlBl'
|
||||
payMobOutPassword='#f9vZtxHdIGvAbl5wWMQkvgZTXrXlBl'
|
||||
payMobOutClientSecrret='xyjjRlahJM0Xc38WjApCOh8bvgL9slFpNdM9YeCu9AhLqboKMPtmSvc2N9O4tXxFLV2JAV6stBSTAGFGCVubGe6MNpc7MzJnZ3SiT6GpavBoCLWkUvVbdSDaM0zHvuBOXrXlBl'
|
||||
payMobOutClient_id='Z05ut48dVkS2gI2zenFFcKsfDKfHAU0WELqKyJ0LXrXlBl'
|
||||
payMobOutPassword='D2zJFxkE#LN3vz38z2dYxpNfWXrXlBl'
|
||||
payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl'
|
||||
|
||||
@@ -110,8 +110,8 @@ class FirebaseMessagesController extends GetxController {
|
||||
'body': message.notification!.body
|
||||
});
|
||||
} else if (message.notification!.title == 'Cancel Trip'.tr) {
|
||||
// NotificationController().showNotification(
|
||||
// 'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'cancel');
|
||||
NotificationController().showNotification(
|
||||
'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'cancel');
|
||||
cancelTripDialog();
|
||||
} else if (message.notification!.title! == 'token change'.tr) {
|
||||
// NotificationController()
|
||||
|
||||
@@ -156,44 +156,46 @@ class AI extends GetxController {
|
||||
),
|
||||
],
|
||||
);
|
||||
} else if (responseCriminalRecordEgypt['FullName'] !=
|
||||
responseIdEgyptDriverLicense['name_arabic']) {
|
||||
Get.defaultDialog(
|
||||
barrierDismissible: false,
|
||||
title: 'Criminal Record Mismatch',
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.warning, size: 48, color: Colors.red),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'The full name on your criminal record does not match the one on your driver’s license. Please verify and provide the correct documents.'
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await Get.find<TextToSpeechController>().speakText(
|
||||
'The full name on your criminal record does not match the one on your driver’s license. Please verify and provide the correct documents.'
|
||||
.tr,
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.volume_up),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
child: const Text('OK'),
|
||||
),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
}
|
||||
// else if (responseCriminalRecordEgypt['FullName'] !=
|
||||
// responseIdEgyptDriverLicense['name_arabic']) {
|
||||
// Get.defaultDialog(
|
||||
// barrierDismissible: false,
|
||||
// title: 'Criminal Record Mismatch',
|
||||
// content: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// const Icon(Icons.warning, size: 48, color: Colors.red),
|
||||
// const SizedBox(height: 16),
|
||||
// Text(
|
||||
// 'The full name on your criminal record does not match the one on your driver’s license. Please verify and provide the correct documents.'
|
||||
// .tr,
|
||||
// textAlign: TextAlign.center,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// const SizedBox(height: 16),
|
||||
// IconButton(
|
||||
// onPressed: () async {
|
||||
// await Get.find<TextToSpeechController>().speakText(
|
||||
// 'The full name on your criminal record does not match the one on your driver’s license. Please verify and provide the correct documents.'
|
||||
// .tr,
|
||||
// );
|
||||
// },
|
||||
// icon: const Icon(Icons.volume_up),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// actions: [
|
||||
// TextButton(
|
||||
// onPressed: () {
|
||||
// Get.back();
|
||||
// },
|
||||
// child: const Text('OK'),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
else {
|
||||
await addDriverEgypt();
|
||||
await addRegistrationCarEgypt();
|
||||
|
||||
@@ -234,7 +236,7 @@ class AI extends GetxController {
|
||||
var status = responseIdEgyptBack['fullName'] ?? '';
|
||||
var birthdate = responseIdEgyptFront['dob'] != null
|
||||
? DateTime.parse(responseIdEgyptFront['dob'] + '-01-01').toString()
|
||||
: '';
|
||||
: '1960-01-01';
|
||||
|
||||
var maritalStatus = responseIdEgyptBack['maritalStatus'] ?? '';
|
||||
var site = responseIdEgyptDriverLicense['address'] ?? '';
|
||||
|
||||
@@ -24,6 +24,8 @@ import '../../functions/location_controller.dart';
|
||||
class MapDriverController extends GetxController {
|
||||
bool isLoading = true;
|
||||
final formKey1 = GlobalKey<FormState>();
|
||||
final formKey2 = GlobalKey<FormState>();
|
||||
final messageToPassenger = TextEditingController();
|
||||
final sosEmergincyNumberCotroller = TextEditingController();
|
||||
List data = [];
|
||||
List dataDestination = [];
|
||||
|
||||
@@ -29,8 +29,7 @@ class PaymobPayout extends GetxController {
|
||||
'client_secret': AK.payMobOutClientSecrret
|
||||
};
|
||||
var res = await http.post(
|
||||
Uri.parse(
|
||||
'https://stagingpayouts.paymobsolutions.com/api/secure/o/token/'),
|
||||
Uri.parse('https://payouts.paymobsolutions.com/api/secure/o/token/'),
|
||||
headers: headers,
|
||||
body: body,
|
||||
);
|
||||
@@ -55,8 +54,7 @@ class PaymobPayout extends GetxController {
|
||||
"msisdn": msisdn, // "01023456789"
|
||||
});
|
||||
var res = await http.post(
|
||||
Uri.parse(
|
||||
'https://stagingpayouts.paymobsolutions.com/api/secure/disburse/'),
|
||||
Uri.parse('https://paymobsolutions.com/api/secure/disburse/'),
|
||||
headers: headers,
|
||||
body: body,
|
||||
);
|
||||
@@ -131,8 +129,7 @@ class PaymobPayout extends GetxController {
|
||||
};
|
||||
var res = await http
|
||||
.post(
|
||||
Uri.parse(
|
||||
'https://stagingpayouts.paymobsolutions.com/api/secure/disburse/'),
|
||||
Uri.parse('https://paymobsolutions.com/api/secure/disburse/'),
|
||||
headers: headers,
|
||||
body: body,
|
||||
)
|
||||
|
||||
@@ -4,61 +4,60 @@ class MyTranslation extends Translations {
|
||||
@override
|
||||
Map<String, Map<String, String>> get keys => {
|
||||
"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":
|
||||
"رصيد حسابك غير كافٍ. يرجى إعادة الشحن للمتابعة",
|
||||
"Commercial International Bank (CIB)": "البنك التجاري الدولي (CIB)",
|
||||
"National Bank of Egypt": "البنك الأهلي المصري",
|
||||
"Qatar National Bank (QNB Alahli)": "بنك قطر الوطني (QNB الأهلي)",
|
||||
"Ahli United Bank": "البنك الأهلي المتحد",
|
||||
"Citi Bank N.A. Egypt": "سيتي بنك مصر",
|
||||
"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": "بنك مصر",
|
||||
"AlexBank": "بنك الإسكندرية",
|
||||
"Banque du Caire (BDC)": "بنك القاهرة",
|
||||
"HSBC Bank Egypt": "بنك HSBC مصر",
|
||||
"Faisal Islamic Bank of Egypt (FAIB)": "بنك فيصل الإسلامي المصري",
|
||||
"Arab African International Bank (AAIB)":
|
||||
"البنك العربي الأفريقي الدولي",
|
||||
"Export Development Bank of Egypt (EDBE)":
|
||||
"بنك تنمية الصادرات المصري",
|
||||
"Industrial Development Bank of Egypt (IDB)":
|
||||
"بنك التنمية الصناعية المصري",
|
||||
"Suez Canal Bank (SCB)": "بنك قناة السويس",
|
||||
"Bank Audi Egypt": "بنك عوده مصر",
|
||||
"Union National Bank Egypt": "بنك الاتحاد الوطني مصر",
|
||||
"Al Baraka Bank Egypt": "بنك البركة مصر",
|
||||
"Blom Bank (BBE)": "بنك بلوم مصر",
|
||||
"Crédit Agricole Egypt (CAE)": "بنك كريدي أجريكول مصر",
|
||||
"Egyptian Gulf Bank (EG Bank)": "بنك الخليج المصري",
|
||||
"Housing and Development Bank (HDB)": "بنك التعمير والإسكان",
|
||||
"The United Bank of Egypt (UB)": "البنك المتحد مصر",
|
||||
"Arab Bank Plc. (ARAB)": "البنك العربي ش.م.ع.",
|
||||
"Emirates NBD (ENBD)": "بنك الإمارات دبي الوطني",
|
||||
"Al Ahli Bank of Kuwait - Egypt (ABK-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)": "بنك باركليز مصر",
|
||||
"Arab African International Bank": "البنك العربي الأفريقي الدولي",
|
||||
"Egyptian Arab Land Bank": "البنك المصري العربي",
|
||||
"Export Development Bank of Egypt": "بنك التنمية والتصدير المصري",
|
||||
"Faisal Islamic Bank of Egypt": "البنك الإسلامي المصري",
|
||||
"Blom Bank": "بلوم بنك",
|
||||
"Abu Dhabi Commercial Bank – Egypt": "بنك أبوظبي التجاري - مصر",
|
||||
"Alex Bank Egypt": "بنك الإسكندرية",
|
||||
"Societe Arabe Internationale De Banque": "البنك العربي الدولي",
|
||||
"National Bank of Egypt": "البنك الأهلي المصري",
|
||||
"Al Baraka Bank Egypt B.S.C.": "بنك البركة مصر",
|
||||
"Egypt Post": "البريد المصري",
|
||||
"Nasser Social Bank": "بنك ناصر الاجتماعي",
|
||||
"Industrial Development Bank": "بنك التنمية الصناعية والعمال",
|
||||
"Suez Canal Bank": "بنك قناة السويس",
|
||||
"Mashreq Bank": "بنك المشرق",
|
||||
"Arab Investment Bank": "البنك العربي للاستثمار",
|
||||
"General Authority For Supply Commodities":
|
||||
"الهيئة العامة للسلع التموينية",
|
||||
"Arab International Bank": "البنك العربي الدولي",
|
||||
"Agricultural Bank of Egypt": "البنك الزراعي المصري",
|
||||
"National Bank of Greece": "البنك الوطني اليوناني",
|
||||
"Central Bank Of Egypt": "البنك المركزي المصري",
|
||||
"ATTIJARIWAFA BANK Egypt": "البنك التجاري وفا مصر",
|
||||
"Morning Promo": "عرض الصباح",
|
||||
"this is count of your all trips in the morning promo today from 7:00am-10:00am":
|
||||
"هذا عدد جميع رحلاتك في عرض الصباح اليوم من الساعة 7:00 صباحًا حتى 10:00 صباحًا",
|
||||
|
||||
@@ -44,9 +44,11 @@ class EgyptCardAI extends StatelessWidget {
|
||||
controller.responseIdEgyptFront.isNotEmpty &&
|
||||
controller.responseIdEgyptBack.isNotEmpty &&
|
||||
controller
|
||||
.responseIdEgyptDriverLicense.isNotEmpty &&
|
||||
controller
|
||||
.responseCriminalRecordEgypt.isNotEmpty)
|
||||
.responseIdEgyptDriverLicense.isNotEmpty
|
||||
// &&
|
||||
// controller
|
||||
// .responseCriminalRecordEgypt.isNotEmpty
|
||||
)
|
||||
? MyElevatedButton(
|
||||
title: 'Next'.tr,
|
||||
onPressed: () {
|
||||
@@ -64,9 +66,11 @@ class EgyptCardAI extends StatelessWidget {
|
||||
controller
|
||||
.responseIdEgyptBack.isNotEmpty &&
|
||||
controller.responseIdEgyptDriverLicense
|
||||
.isNotEmpty &&
|
||||
controller.responseCriminalRecordEgypt
|
||||
.isNotEmpty)
|
||||
.isNotEmpty
|
||||
// &&
|
||||
// controller.responseCriminalRecordEgypt
|
||||
// .isNotEmpty
|
||||
)
|
||||
? Get.height * .7
|
||||
: Get.height * .85,
|
||||
child: ListView(
|
||||
@@ -662,13 +666,23 @@ Important notes:
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
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
|
||||
"car_plate": "",
|
||||
"owner": "",
|
||||
"address": ""
|
||||
"LicenseExpirationDate": "YYYY-MM-DD",
|
||||
"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's full name]",
|
||||
"address": "[Address if available, otherwise 'Not provided']"
|
||||
}
|
||||
|
||||
Important notes:
|
||||
@@ -723,13 +737,23 @@ Please fill in the JSON object with the extracted information, following these g
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
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
|
||||
"car_plate": "",
|
||||
"owner": "",
|
||||
"address": ""
|
||||
"LicenseExpirationDate": "YYYY-MM-DD",
|
||||
"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's full name]",
|
||||
"address": "[Address if available, otherwise 'Not provided']"
|
||||
}
|
||||
|
||||
Important notes:
|
||||
|
||||
@@ -167,15 +167,28 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: IconButton(
|
||||
// onPressed: () {
|
||||
// launchCommunication('phone', '+201023248456', '');
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.grin_tears,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// 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(
|
||||
// FontAwesome5.grin_tears,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:SEFER/views/widgets/my_textField.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
@@ -91,17 +92,17 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
AppStyle.title,
|
||||
content: SizedBox(
|
||||
height: Get.height * .5,
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.spaceEvenly,
|
||||
child: ListView(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment
|
||||
// .spaceEvenly,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
'message From Driver'
|
||||
.tr,
|
||||
"There's heavy traffic here. Can you suggest an alternate pickup point?"
|
||||
"Where are you, sir?"
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
@@ -117,7 +118,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
.all(
|
||||
10),
|
||||
child: Text(
|
||||
"There's heavy traffic here. Can you suggest an alternate pickup point?"
|
||||
"Where are you, sir?"
|
||||
.tr,
|
||||
style: AppStyle
|
||||
.title,
|
||||
@@ -125,12 +126,15 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
'message From Driver'
|
||||
.tr,
|
||||
"Heading your way now. Please be ready."
|
||||
"I've been trying to reach you but your phone is off."
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
@@ -146,7 +150,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
.all(
|
||||
10),
|
||||
child: Text(
|
||||
"Heading your way now. Please be ready."
|
||||
"I've been trying to reach you but your phone is off."
|
||||
.tr,
|
||||
style: AppStyle
|
||||
.title,
|
||||
@@ -154,12 +158,15 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
'message From Driver'
|
||||
.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,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
@@ -175,7 +182,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
.all(
|
||||
10),
|
||||
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,
|
||||
style: AppStyle
|
||||
.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))
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
));
|
||||
|
||||
@@ -185,6 +185,21 @@ class OrderRequestPage extends StatelessWidget {
|
||||
double.parse(myList[2]).toStringAsFixed(2),
|
||||
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(
|
||||
myList[31].toString(),
|
||||
style: AppStyle.title
|
||||
|
||||
@@ -1,50 +1,52 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class BankController extends GetxController {
|
||||
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 = {
|
||||
'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',
|
||||
'Qatar National Bank (QNB Alahli)'.tr: 'QNB',
|
||||
'Banque Misr'.tr: 'BM',
|
||||
'Banque du Caire (BDC)'.tr: 'BDC',
|
||||
'HSBC Bank Egypt'.tr: 'HSBC',
|
||||
'Faisal Islamic Bank of Egypt (FAIB)'.tr: 'FAIB',
|
||||
'Arab African International Bank (AAIB)'.tr: 'AAIB',
|
||||
'Export Development Bank of Egypt (EDBE)'.tr: 'EDBE',
|
||||
'Industrial Development Bank of Egypt (IDB)'.tr: 'IDB',
|
||||
'Suez Canal Bank (SCB)'.tr: 'SCB',
|
||||
'Bank Audi Egypt'.tr: 'BAE',
|
||||
'Union National Bank Egypt'.tr: 'UNB',
|
||||
'Al Baraka Bank Egypt'.tr: 'ABE',
|
||||
'Egyptian Gulf Bank (EG Bank)'.tr: 'EGB',
|
||||
'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
|
||||
'Al Baraka Bank Egypt B.S.C.'.tr: 'ABRK',
|
||||
'Egypt Post'.tr: 'POST',
|
||||
'Nasser Social Bank'.tr: 'NSB',
|
||||
'Industrial Development Bank'.tr: 'IDB',
|
||||
'Suez Canal Bank'.tr: 'SCB',
|
||||
'Mashreq Bank'.tr: 'MASHA',
|
||||
'Arab Investment Bank'.tr: 'AIB',
|
||||
'General Authority For Supply Commodities'.tr: 'GASCA',
|
||||
'Arab International Bank'.tr: 'AIB',
|
||||
'Agricultural Bank of Egypt'.tr: 'PDAC',
|
||||
'National Bank of Greece'.tr: 'NBG',
|
||||
'Central Bank Of Egypt'.tr: 'CBE',
|
||||
'ATTIJARIWAFA BANK Egypt'.tr: 'BBE',
|
||||
};
|
||||
|
||||
@override
|
||||
@@ -66,6 +68,30 @@ class BankController extends GetxController {
|
||||
);
|
||||
}).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 {
|
||||
@@ -76,10 +102,37 @@ class BankDropdown extends StatelessWidget {
|
||||
return GetBuilder<BankController>(
|
||||
init: bankController,
|
||||
builder: (controller) {
|
||||
return DropdownButton<String>(
|
||||
value: controller.selectedBank,
|
||||
onChanged: controller.updateSelectedBank,
|
||||
items: controller.getDropdownItems(),
|
||||
return CupertinoButton(
|
||||
padding: EdgeInsets.zero,
|
||||
onPressed: () => controller.showBankPicker(context),
|
||||
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),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user