Update codebase

This commit is contained in:
Hamza-Ayed
2026-08-11 00:11:23 +03:00
parent 6726fcd917
commit 0ff7d04f9a
345 changed files with 3756 additions and 3369 deletions
@@ -3,7 +3,7 @@ import 'package:get/get.dart';
import '../../../constant/colors.dart';
import '../../../controller/insurance/driver_insurance_controller.dart';
import '../../widgets/ui/siro_ui.dart';
import '../../widgets/ui/tripz_ui.dart';
/// شاشة التأمين: الوثيقة النشطة ودفترها، أو الخطط المتاحة.
///
@@ -17,19 +17,19 @@ class DriverInsurancePage extends StatelessWidget {
Widget build(BuildContext context) {
final c = Get.put(DriverInsuranceController());
return SiroPage(
return TripzPage(
title: 'Insurance'.tr,
body: Obx(() {
if (c.isLoading.value) {
return const SiroLoading();
return const TripzLoading();
}
return RefreshIndicator(
onRefresh: c.refreshAll,
color: SiroUi.interactive(context),
color: TripzUi.interactive(context),
child: ListView(
physics: const AlwaysScrollableScrollPhysics(),
padding: SiroUi.pageInsets,
padding: TripzUi.pageInsets,
children:
c.hasPolicy ? _policyView(context, c) : _plansView(context, c),
),
@@ -43,14 +43,14 @@ class DriverInsurancePage extends StatelessWidget {
final p = c.policy.value!;
return [
SiroCard(
TripzCard(
accent: AppColor.greenColor,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
const SiroIconBadge(Icons.verified_user_rounded,
const TripzIconBadge(Icons.verified_user_rounded,
color: AppColor.greenColor),
const SizedBox(width: 10),
Expanded(
@@ -90,7 +90,7 @@ class DriverInsurancePage extends StatelessWidget {
// ── دفتر الأقساط ──
// يظهر في نفس الشاشة لا في أخرى: الخصم الذي لا يرى السائق مقابله
// مفاجأة تُفقد الثقة، مهما كان مشروحاً في مكان آخر.
SiroCard(
TripzCard(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -152,7 +152,7 @@ class DriverInsurancePage extends StatelessWidget {
// ‏نقص أهلية — ونقولها صراحة حتى لا يظن الكابتن أن التطبيق خربان.
return [
const SizedBox(height: 48),
SiroEmptyState(
TripzEmptyState(
icon: Icons.health_and_safety_outlined,
title: 'No insurance plans available yet'.tr,
message:
@@ -168,7 +168,7 @@ class DriverInsurancePage extends StatelessWidget {
final progress = (plan['progress_rides'] ?? 0) as num;
final required = (plan['required_rides'] ?? 0) as num;
return SiroCard(
return TripzCard(
accent: eligible ? AppColor.greenColor : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -183,7 +183,7 @@ class DriverInsurancePage extends StatelessWidget {
?.copyWith(fontWeight: FontWeight.bold)),
),
if (eligible)
SiroTag('Eligible'.tr,
TripzTag('Eligible'.tr,
color: AppColor.greenColor,
icon: Icons.check_circle_rounded),
],
@@ -196,7 +196,7 @@ class DriverInsurancePage extends StatelessWidget {
'${plan['billing_cycle'] == 'monthly' ? 'Monthly'.tr : 'Daily'.tr}',
style: Theme.of(context).textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold,
color: SiroUi.interactive(context),
color: TripzUi.interactive(context),
),
),
if ((plan['coverage'] ?? '').toString().isNotEmpty) ...[
@@ -214,7 +214,7 @@ class DriverInsurancePage extends StatelessWidget {
child: LinearProgressIndicator(
minHeight: 7,
value: required == 0 ? 0 : (progress / required).clamp(0, 1),
backgroundColor: SiroUi.border(context),
backgroundColor: TripzUi.border(context),
),
),
const SizedBox(height: 6),
@@ -290,5 +290,5 @@ class DriverInsurancePage extends StatelessWidget {
(double.tryParse('${v ?? 0}') ?? 0).toStringAsFixed(2);
Widget _row(String label, String value) =>
SiroDetailRow(label: label, value: value);
TripzDetailRow(label: label, value: value);
}