This commit is contained in:
Hamza-Ayed
2024-08-13 00:47:48 +03:00
parent d43c421dc3
commit 7038b514a0
6 changed files with 353 additions and 87 deletions

View File

@@ -324,45 +324,46 @@ class RegisterCaptainController extends GetxController {
),
],
);
} else if (responseIdEgyptDriverLicense['national_number']
.toString()
.substring(0, 12) !=
responseIdEgyptBack['nationalID'].toString().substring(0, 12)) {
Get.defaultDialog(
barrierDismissible: false,
title: 'ID Mismatch',
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.warning, size: 48, color: Colors.red),
const SizedBox(height: 16),
Text(
"The national number on your drivers license does not match the one on your ID document. 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 national number on your drivers license does not match the one on your ID document. Please verify and provide the correct documents.',
// );
},
icon: const Icon(Icons.volume_up),
),
],
),
actions: [
TextButton(
onPressed: () {
Get.back();
},
child: const Text('OK'),
),
],
);
}
// else if (responseIdEgyptDriverLicense['national_number']
// .toString()
// .substring(0, 12) !=
// responseIdEgyptBack['nationalID'].toString().substring(0, 12)) {
// Get.defaultDialog(
// barrierDismissible: false,
// title: 'ID Mismatch',
// content: Column(
// mainAxisSize: MainAxisSize.min,
// children: [
// const Icon(Icons.warning, size: 48, color: Colors.red),
// const SizedBox(height: 16),
// Text(
// "The national number on your drivers license does not match the one on your ID document. 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 national number on your drivers license does not match the one on your ID document. Please verify and provide the correct documents.',
// // );
// },
// icon: const Icon(Icons.volume_up),
// ),
// ],
// ),
// actions: [
// TextButton(
// onPressed: () {
// Get.back();
// },
// child: const Text('OK'),
// ),
// ],
// );
// }
// else if (responseCriminalRecordEgypt['FullName'] !=
// responseIdEgyptDriverLicense['name_arabic']) {
// Get.defaultDialog(
@@ -540,7 +541,7 @@ class RegisterCaptainController extends GetxController {
: responseIdEgyptDriverLicense['license_type'],
'national_number': nationalNumber.value.isNotEmpty
? nationalNumber.value
: responseIdEgyptBack['nationalID'],
: responseIdEgyptDriverLicense['national_number'],
'name_arabic': nameArabic.value.isNotEmpty
? nameArabic.value
: responseIdEgyptDriverLicense['name_arabic'],