Update: 2026-08-03 00:20:40

This commit is contained in:
Hamza-Ayed
2026-08-03 00:20:40 +03:00
parent c23c3c0721
commit 2b9f696372
39 changed files with 38513 additions and 38217 deletions
@@ -1,3 +1,4 @@
import 'package:siro_admin/constant/theme.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -79,7 +80,7 @@ class PassengerDetailsPage extends StatelessWidget {
Icons.sos,
'SOS Phone',
data['sosPhone'] ?? 'N/A',
valueColor: Colors.redAccent,
valueColor: cs.danger,
),
],
),
@@ -94,7 +95,7 @@ class PassengerDetailsPage extends StatelessWidget {
Icons.star_rate_rounded,
'Rating',
'${data['ratingPassenger'] ?? 0.0}',
valueColor: Colors.amber[700],
valueColor: cs.warning[700],
),
_buildDetailTile(
Icons.directions_car_filled_outlined,
@@ -105,7 +106,7 @@ class PassengerDetailsPage extends StatelessWidget {
Icons.cancel_outlined,
'Canceled Rides',
data['countPassengerCancel'],
valueColor: Colors.redAccent,
valueColor: cs.danger,
),
_buildDetailTile(
Icons.rate_review_outlined,
@@ -143,7 +144,7 @@ class PassengerDetailsPage extends StatelessWidget {
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.1),
color: cs.onSurfaceVariant.withValues(alpha: 0.1),
blurRadius: 10,
offset: const Offset(0, 5),
)
@@ -154,7 +155,7 @@ class PassengerDetailsPage extends StatelessWidget {
children: [
CircleAvatar(
radius: 45,
backgroundColor: AppColor.primaryColor.withOpacity(0.1),
backgroundColor: AppColor.primaryColor.withValues(alpha: 0.1),
child: Text(
fullName[0].toUpperCase(),
style: TextStyle(
@@ -175,14 +176,14 @@ class PassengerDetailsPage extends StatelessWidget {
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
decoration: BoxDecoration(
color: Colors.blue.withOpacity(0.1),
color: cs.info.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(20),
),
child: Text(
data['status'] ?? 'Active',
style: const TextStyle(
fontSize: 12,
color: Colors.blue,
color: cs.info,
fontWeight: FontWeight.w600),
),
),
@@ -202,11 +203,11 @@ class PassengerDetailsPage extends StatelessWidget {
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.05),
color: cs.onSurfaceVariant.withValues(alpha: 0.05),
spreadRadius: 2,
blurRadius: 10)
],
border: Border.all(color: Colors.grey.withOpacity(0.1)),
border: Border.all(color: cs.onSurfaceVariant.withValues(alpha: 0.1)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -220,7 +221,7 @@ class PassengerDetailsPage extends StatelessWidget {
fontSize: 17, fontWeight: FontWeight.bold)),
],
),
Divider(height: 25, color: Colors.grey.withOpacity(0.2)),
Divider(height: 25, color: cs.onSurfaceVariant.withValues(alpha: 0.2)),
...children,
],
),
@@ -236,9 +237,9 @@ class PassengerDetailsPage extends StatelessWidget {
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.grey[100],
color: cs.onSurfaceVariant,
borderRadius: BorderRadius.circular(8)),
child: Icon(icon, color: Colors.grey[600], size: 18),
child: Icon(icon, color: cs.onSurfaceVariant, size: 18),
),
const SizedBox(width: 14),
Expanded(
@@ -246,7 +247,7 @@ class PassengerDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(label.tr,
style: TextStyle(fontSize: 12, color: Colors.grey[500])),
style: TextStyle(fontSize: 12, color: cs.onSurfaceVariant)),
Text(
value?.toString() ?? 'N/A',
style: TextStyle(
@@ -320,8 +321,8 @@ class PassengerDetailsPage extends StatelessWidget {
icon: const Icon(Icons.delete_outline_rounded, size: 20),
label: Text("Delete".tr),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red[50],
foregroundColor: Colors.red,
backgroundColor: cs.danger[50],
foregroundColor: cs.danger,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
@@ -338,7 +339,7 @@ class PassengerDetailsPage extends StatelessWidget {
Text(
"Only Super Admins can edit or delete passengers.",
style: TextStyle(
color: Colors.grey[400],
color: cs.onSurfaceVariant,
fontSize: 12,
fontStyle: FontStyle.italic),
)
@@ -405,7 +406,7 @@ class PassengerDetailsPage extends StatelessWidget {
),
cancel: TextButton(
onPressed: () => Get.back(),
child: Text('Cancel'.tr, style: const TextStyle(color: Colors.grey))),
child: Text('Cancel'.tr, style: const TextStyle(color: cs.onSurfaceVariant))),
);
}
@@ -413,12 +414,12 @@ class PassengerDetailsPage extends StatelessWidget {
Get.defaultDialog(
title: 'Confirm Deletion'.tr,
titleStyle:
const TextStyle(color: Colors.redAccent, fontWeight: FontWeight.bold),
const TextStyle(color: cs.danger, fontWeight: FontWeight.bold),
middleText:
'Are you sure you want to delete ${user['first_name']}? This action cannot be undone.'
.tr,
confirm: ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: Colors.redAccent),
style: ElevatedButton.styleFrom(backgroundColor: cs.danger),
onPressed: () async {
// 1. Close Dialog
Get.back();
@@ -447,7 +448,7 @@ class PassengerDetailsPage extends StatelessWidget {
),
cancel: TextButton(
onPressed: () => Get.back(),
child: Text('Cancel'.tr, style: const TextStyle(color: Colors.grey)),
child: Text('Cancel'.tr, style: const TextStyle(color: cs.onSurfaceVariant)),
),
);
}