Update: 2026-06-25 18:05:26

This commit is contained in:
Hamza-Ayed
2026-06-25 18:05:26 +03:00
parent 1e24c3d0c8
commit a4d9d8e74c
3 changed files with 141 additions and 536 deletions

View File

@@ -105,9 +105,9 @@ class ReviewDriverPage extends StatelessWidget {
Icon(Icons.public, size: 16, color: AppColor.primaryColor),
const SizedBox(width: 6),
Text(
c.country.value.isNotEmpty
? 'Country: ${c.country.value}'
: 'Detecting country...',
c.country.isNotEmpty
? 'Country: ${c.country}'
: 'Detecting country...',
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
@@ -193,7 +193,7 @@ class ReviewDriverPage extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('${c.country.value} - Criminal Record',
Text('${c.country} - Criminal Record',
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
const Divider(),
Card(
@@ -206,7 +206,7 @@ class ReviewDriverPage extends StatelessWidget {
const SizedBox(width: 12),
Expanded(
child: Text(
_getCriminalRecordHint(c.country.value),
_getCriminalRecordHint(c.country),
style: TextStyle(color: Colors.green[800]),
),
),
@@ -256,7 +256,7 @@ class ReviewDriverPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'${c.country.value} - ${c.tabLabels[tabKey] ?? tabKey}',
'${c.country} - ${c.tabLabels[tabKey] ?? tabKey}',
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const Divider(),
@@ -320,19 +320,14 @@ class ReviewDriverPage extends StatelessWidget {
if (l.contains('email')) return Icons.email;
if (l.contains('address')) return Icons.location_on;
if (l.contains('birth')) return Icons.cake;
if (l.contains('father') || l.contains('mother')) return Icons.people;
if (l.contains('license') || l.contains('category')) return Icons.card_membership;
if (l.contains('plate')) return Icons.confirmation_number;
if (l.contains('owner')) return Icons.person_search;
if (l.contains('make') || l.contains('model')) return Icons.directions_car;
if (l.contains('year')) return Icons.calendar_today;
if (l.contains('vin')) return Icons.confirmation_number;
if (l.contains('governorate') || l.contains('place')) return Icons.location_city;
if (l.contains('blood')) return Icons.water_drop;
if (l.contains('spouse') || l.contains('marital')) return Icons.people;
if (l.contains('occupation')) return Icons.work;
if (l.contains('restriction')) return Icons.block;
if (l.contains('engine') || l.contains('capacity')) return Icons.settings;
if (l.contains('place')) return Icons.location_city;
if (l.contains('marital')) return Icons.people;
if (l.contains('first name') || l.contains('last name')) return Icons.person;
return null;
}
@@ -358,22 +353,7 @@ class ReviewDriverPage extends StatelessWidget {
case 'makeController': return c.makeController;
case 'modelController': return c.modelController;
case 'yearController': return c.yearController;
case 'fatherNameController': return c.fatherNameController;
case 'motherNameController': return c.motherNameController;
case 'birthPlaceController': return c.birthPlaceController;
case 'bloodTypeController': return c.bloodTypeController;
case 'maritalStatusController': return c.maritalStatusController;
case 'spouseNameController': return c.spouseNameController;
case 'idIssueDateController': return c.idIssueDateController;
case 'idExpiryDateController': return c.idExpiryDateController;
case 'licenseNumberController': return c.licenseNumberController;
case 'licenseCategoryController': return c.licenseCategoryController;
case 'restrictionsController': return c.restrictionsController;
case 'governorateController': return c.governorateController;
case 'occupationController': return c.occupationController;
case 'religionController': return c.religionController;
case 'engineCapacityController': return c.engineCapacityController;
case 'passengerCapacityController': return c.passengerCapacityController;
default: return null;
}
}
@@ -416,7 +396,7 @@ class ReviewDriverPage extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 6),
child: Obx(
() => DropdownButtonFormField<String>(
value: c.selectedGender.value.isEmpty
initialValue: c.selectedGender.value.isEmpty
? null
: c.selectedGender.value,
isExpanded: true,
@@ -444,7 +424,7 @@ class ReviewDriverPage extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 6),
child: Obx(
() => DropdownButtonFormField<String>(
value: c.colorHex.value.isEmpty ? null : c.colorHex.value,
initialValue: c.colorHex.value.isEmpty ? null : c.colorHex.value,
isExpanded: true,
decoration: InputDecoration(
labelText: label.tr,
@@ -487,7 +467,7 @@ class ReviewDriverPage extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 6),
child: Obx(
() => DropdownButtonFormField<String>(
value: ReviewDriverController.kFuelOptions
initialValue: ReviewDriverController.kFuelOptions
.contains(c.selectedFuel.value)
? c.selectedFuel.value
: null,