7/3/1
This commit is contained in:
@@ -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