25-01-21-secure
This commit is contained in:
@@ -322,7 +322,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper.encryptData(
|
||||
encryptionHelper.decryptData(
|
||||
ai.prompts[0]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'driver_license'); //egypt
|
||||
@@ -335,30 +335,32 @@ class EgyptCardAI extends StatelessWidget {
|
||||
const Divider(color: AppColor.accentColor),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'License Type'.tr}: ${ai.responseIdEgyptDriverLicense['license_type']}',
|
||||
'${'License Type'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptDriverLicense['license_type'])}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'National Number'.tr}: ${ai.responseIdEgyptDriverLicense['national_number']}',
|
||||
'${'National Number'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptDriverLicense['national_number'])}',
|
||||
style: AppStyle.title.copyWith(
|
||||
color: ai.responseIdEgyptDriverLicense[
|
||||
'national_number'] ==
|
||||
ai.responseIdEgyptBack['nationalID']
|
||||
color: encryptionHelper.decryptData(
|
||||
ai.responseIdEgyptDriverLicense[
|
||||
'national_number']) ==
|
||||
encryptionHelper.decryptData(
|
||||
ai.responseIdEgyptBack['nationalID'])
|
||||
? AppColor.greenColor
|
||||
: AppColor.redColor),
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Name (Arabic)'.tr}: ${ai.responseIdEgyptDriverLicense['name_arabic']}',
|
||||
'${'Name (Arabic)'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptDriverLicense['name_arabic'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Name (English)'.tr}: ${ai.responseIdEgyptDriverLicense['name_english']}',
|
||||
'${'Name (English)'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptDriverLicense['name_english'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Address'.tr}: ${ai.responseIdEgyptDriverLicense['address']}',
|
||||
'${'Address'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptDriverLicense['address'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
@@ -386,7 +388,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onTap: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper
|
||||
.encryptData(ai.prompts[0]['prompt'].toString()),
|
||||
.decryptData(ai.prompts[0]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'driver_license'); //egypt
|
||||
},
|
||||
@@ -441,7 +443,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper.encryptData(
|
||||
encryptionHelper.decryptData(
|
||||
ai.prompts[1]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'id_back'); //egypt
|
||||
@@ -455,18 +457,20 @@ class EgyptCardAI extends StatelessWidget {
|
||||
const SizedBox(height: 8.0),
|
||||
// Assuming these keys exist in ai.responseIdEgyptFront
|
||||
Text(
|
||||
'${'National ID'.tr}: ${ai.responseIdEgyptBack['nationalID']}',
|
||||
'${'National ID'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptBack['nationalID'])}',
|
||||
style: AppStyle.title.copyWith(
|
||||
color: ai.responseIdEgyptDriverLicense[
|
||||
'national_number'] ==
|
||||
ai.responseIdEgyptBack['nationalID']
|
||||
color: encryptionHelper.decryptData(
|
||||
ai.responseIdEgyptDriverLicense[
|
||||
'national_number']) ==
|
||||
encryptionHelper.decryptData(
|
||||
ai.responseIdEgyptBack['nationalID'])
|
||||
? AppColor.greenColor
|
||||
: AppColor.redColor),
|
||||
),
|
||||
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Occupation'.tr}: ${ai.responseIdEgyptBack['occupation']}', // Assuming 'occupation' exists
|
||||
'${'Occupation'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptBack['occupation'])}', // Assuming 'occupation' exists
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Row(
|
||||
@@ -476,7 +480,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
'${'Issue Date'.tr}: ${ai.responseIdEgyptBack['issueDate']}', // Assuming 'issueDate' exists
|
||||
),
|
||||
Text(
|
||||
'${'Gender'.tr}: ${ai.responseIdEgyptBack['gender']}', // Assuming 'gender' exists
|
||||
'${'Gender'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptBack['gender'])}', // Assuming 'gender' exists
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -514,7 +518,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onTap: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper
|
||||
.encryptData(ai.prompts[1]['prompt'].toString()),
|
||||
.decryptData(ai.prompts[1]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'id_back'); //egypt
|
||||
},
|
||||
@@ -568,8 +572,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onPressed: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper.decryptData(
|
||||
encryptionHelper.encryptData(
|
||||
ai.prompts[7]['prompt'].toString())),
|
||||
ai.prompts[7]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'non_id_back');
|
||||
},
|
||||
@@ -581,16 +584,16 @@ class EgyptCardAI extends StatelessWidget {
|
||||
const Divider(color: AppColor.accentColor),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Country'.tr}: ${ai.responseNonIdCardBack['country']}',
|
||||
'${'Country'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardBack['country'])}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Residency Type'.tr}: ${ai.responseNonIdCardBack['residencyType']}',
|
||||
'${'Residency Type'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardBack['residencyType'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Work Status'.tr}: ${ai.responseNonIdCardBack['workStatus']}',
|
||||
'${'Work Status'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardBack['workStatus'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Row(
|
||||
@@ -600,7 +603,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
'${'Issue Date'.tr}: ${ai.responseNonIdCardBack['issueDate']}',
|
||||
),
|
||||
Text(
|
||||
'${'Birth Date'.tr}: ${ai.responseNonIdCardBack['birthDate']}',
|
||||
'${'Birth Date'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardBack['birthDate'])}',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -622,7 +625,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onTap: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper
|
||||
.encryptData(ai.prompts[7]['prompt'].toString()),
|
||||
.decryptData(ai.prompts[7]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'non_id_back');
|
||||
},
|
||||
@@ -667,7 +670,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper.encryptData(
|
||||
encryptionHelper.decryptData(
|
||||
ai.prompts[2]['id_front'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'id_front'); //egypt
|
||||
@@ -685,10 +688,10 @@ class EgyptCardAI extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'First Name'.tr}: ${ai.responseIdEgyptFront['first_name']}',
|
||||
'${'First Name'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptFront['first_name'])}',
|
||||
),
|
||||
Text(
|
||||
'${'CardID'.tr}: ${ai.responseIdEgyptFront['card_id']}',
|
||||
'${'CardID'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptFront['card_id'])}',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -697,16 +700,16 @@ class EgyptCardAI extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Full Name'.tr}: ${ai.responseIdEgyptFront['full_name']}',
|
||||
'${'Full Name'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptFront['full_name'])}',
|
||||
),
|
||||
Text(
|
||||
'${'DOB'.tr}: ${ai.responseIdEgyptFront['dob']}',
|
||||
'${'DOB'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptFront['dob'])}',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Address'.tr}: ${ai.responseIdEgyptFront['address']}',
|
||||
'${'Address'.tr}: ${encryptionHelper.decryptData(ai.responseIdEgyptFront['address'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
// Text(
|
||||
@@ -725,7 +728,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onTap: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper
|
||||
.encryptData(ai.prompts[2]['prompt'].toString()),
|
||||
.decryptData(ai.prompts[2]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'id_front'); //egypt
|
||||
},
|
||||
@@ -770,7 +773,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper.encryptData(
|
||||
encryptionHelper.decryptData(
|
||||
ai.prompts[6]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'non_id_front');
|
||||
@@ -783,7 +786,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
const Divider(color: AppColor.accentColor),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Full Name'.tr}: ${ai.responseNonIdCardFront['full_name']}',
|
||||
'${'Full Name'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardFront['full_name'])}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
@@ -791,10 +794,10 @@ class EgyptCardAI extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Passport No'.tr}: ${ai.responseNonIdCardFront['passport_no']}',
|
||||
'${'Passport No'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardFront['passport_no'])}',
|
||||
),
|
||||
Text(
|
||||
'${'Card ID'.tr}: ${ai.responseNonIdCardFront['card_id']}',
|
||||
'${'Card ID'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardFront['card_id'])}',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -803,20 +806,20 @@ class EgyptCardAI extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Country'.tr}: ${ai.responseNonIdCardFront['country']}',
|
||||
'${'Country'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardFront['country'])}',
|
||||
),
|
||||
Text(
|
||||
'${'Gender'.tr}: ${ai.responseNonIdCardFront['gender']}',
|
||||
'${'Gender'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardFront['gender'])}',
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Birth Date'.tr}: ${ai.responseNonIdCardFront['birthdate']}',
|
||||
'${'Birth Date'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardFront['birthdate'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Address'.tr}: ${ai.responseNonIdCardFront['address']}',
|
||||
'${'Address'.tr}: ${encryptionHelper.decryptData(ai.responseNonIdCardFront['address'])}',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -828,7 +831,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onTap: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper
|
||||
.encryptData(ai.prompts[6]['prompt'].toString()),
|
||||
.decryptData(ai.prompts[6]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'non_id_front');
|
||||
},
|
||||
@@ -881,7 +884,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
ai.allMethodForAI(
|
||||
encryptionHelper.encryptData(
|
||||
encryptionHelper.decryptData(
|
||||
ai.prompts[3]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'car_front');
|
||||
@@ -896,15 +899,15 @@ class EgyptCardAI extends StatelessWidget {
|
||||
// Removed Make, Model, etc. as they are not available
|
||||
|
||||
Text(
|
||||
'${'Plate Number'.tr}: ${ai.responseIdCardDriverEgyptFront['car_plate']}',
|
||||
'${'Plate Number'.tr}: ${encryptionHelper.decryptData(ai.responseIdCardDriverEgyptFront['car_plate'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Owner Name'.tr}: ${ai.responseIdCardDriverEgyptFront['owner']}',
|
||||
'${'Owner Name'.tr}: ${encryptionHelper.decryptData(ai.responseIdCardDriverEgyptFront['owner'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'Address'.tr}: ${ai.responseIdCardDriverEgyptFront['address']}',
|
||||
'${'Address'.tr}: ${encryptionHelper.decryptData(ai.responseIdCardDriverEgyptFront['address'])}',
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Row(
|
||||
@@ -930,7 +933,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onTap: () async {
|
||||
ai.allMethodForAI(
|
||||
encryptionHelper
|
||||
.encryptData(ai.prompts[3]['prompt'].toString()),
|
||||
.decryptData(ai.prompts[3]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'car_front');
|
||||
},
|
||||
@@ -1000,7 +1003,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
ai.allMethodForAI(
|
||||
encryptionHelper.encryptData(
|
||||
encryptionHelper.decryptData(
|
||||
ai.prompts[4]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'car_back');
|
||||
@@ -1016,9 +1019,9 @@ class EgyptCardAI extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Make'.tr}: ${ai.responseIdCardDriverEgyptBack['make']}'),
|
||||
'${'Make'.tr}: ${(ai.responseIdCardDriverEgyptBack['make'])}'),
|
||||
Text(
|
||||
'${'Model'.tr}: ${ai.responseIdCardDriverEgyptBack['model']}'),
|
||||
'${'Model'.tr}: ${(ai.responseIdCardDriverEgyptBack['model'])}'),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
@@ -1075,7 +1078,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onTap: () async {
|
||||
ai.allMethodForAI(
|
||||
encryptionHelper
|
||||
.encryptData(ai.prompts[4]['prompt'].toString()),
|
||||
.decryptData(ai.prompts[4]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'car_back');
|
||||
},
|
||||
@@ -1120,7 +1123,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper.encryptData(
|
||||
encryptionHelper.decryptData(
|
||||
ai.prompts[5]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'criminalRecord',
|
||||
@@ -1137,16 +1140,19 @@ class EgyptCardAI extends StatelessWidget {
|
||||
'${'InspectionResult'.tr}: ${ai.responseCriminalRecordEgypt['InspectionResult']}'),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'FullName'.tr}: ${ai.responseCriminalRecordEgypt['FullName']}',
|
||||
'${'FullName'.tr}: ${encryptionHelper.decryptData(ai.responseCriminalRecordEgypt['FullName'])}',
|
||||
style: AppStyle.title.copyWith(
|
||||
color: ai.responseCriminalRecordEgypt['FullName'] ==
|
||||
ai.responseIdEgyptDriverLicense['name_arabic']
|
||||
color: encryptionHelper.decryptData(ai
|
||||
.responseCriminalRecordEgypt['FullName']) ==
|
||||
encryptionHelper.decryptData(
|
||||
ai.responseIdEgyptDriverLicense[
|
||||
'name_arabic'])
|
||||
? AppColor.greenColor
|
||||
: AppColor.redColor),
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'NationalID'.tr}: ${ai.responseCriminalRecordEgypt['NationalID']}'),
|
||||
'${'NationalID'.tr}: ${encryptionHelper.decryptData(ai.responseCriminalRecordEgypt['NationalID'])}'),
|
||||
const SizedBox(height: 8.0),
|
||||
Text(
|
||||
'${'IssueDate'.tr}: ${ai.responseCriminalRecordEgypt['IssueDate']}'),
|
||||
@@ -1160,7 +1166,7 @@ class EgyptCardAI extends StatelessWidget {
|
||||
onTap: () async {
|
||||
await ai.allMethodForAI(
|
||||
encryptionHelper
|
||||
.encryptData(ai.prompts[5]['prompt'].toString()),
|
||||
.decryptData(ai.prompts[5]['prompt'].toString()),
|
||||
AppLink.uploadEgypt,
|
||||
'criminalRecord',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user