26-1-20/1

This commit is contained in:
Hamza-Ayed
2026-01-20 10:11:10 +03:00
parent 374f9e9bf3
commit 3c0ae4cf2f
53 changed files with 89652 additions and 6861 deletions

View File

@@ -186,6 +186,52 @@ class RegistrationView extends StatelessWidget {
style:
const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
const SizedBox(height: 20),
// ============================================================
// 1. القائمة المنسدلة لتصنيف المركبة (سيارة، دراجة، فان)
// ============================================================
DropdownButtonFormField<int>(
value: c.selectedVehicleCategoryId,
decoration: InputDecoration(
labelText: 'Vehicle Category'.tr, // ترجمة: تصنيف المركبة
border: const OutlineInputBorder(),
prefixIcon: const Icon(Icons.directions_car),
),
items: c.vehicleCategoryOptions.map((item) {
return DropdownMenuItem<int>(
value: item['id'],
child: Text(item['name']),
);
}).toList(),
onChanged: (val) {
c.selectedVehicleCategoryId = val;
c.update(); // تحديث الواجهة إذا لزم الأمر
},
validator: (v) => (v == null) ? 'Required field'.tr : null,
),
const SizedBox(height: 16),
// ============================================================
// 2. القائمة المنسدلة لنوع الوقود (بنزين، كهرباء...)
// ============================================================
DropdownButtonFormField<int>(
value: c.selectedFuelTypeId,
decoration: InputDecoration(
labelText: 'Fuel Type'.tr, // ترجمة: نوع الوقود
border: const OutlineInputBorder(),
prefixIcon: const Icon(Icons.local_gas_station),
),
items: c.fuelTypeOptions.map((item) {
return DropdownMenuItem<int>(
value: item['id'],
child: Text(item['name']),
);
}).toList(),
onChanged: (val) {
c.selectedFuelTypeId = val;
c.update();
},
validator: (v) => (v == null) ? 'Required field'.tr : null,
),
const SizedBox(height: 16),
TextFormField(
controller: c.carPlateController,
decoration: InputDecoration(