Files
tripz-llc/apps/rider/lib/views/home/route_planner/rp_theme.dart
T
Hamza-AyedandClaude Opus 5 4d8414c96b feat: استيراد كود سيرو إلى تريبز (سيرو @ecfe7568) — بلا تعديل
قرار المالك 2026-07-27: باك إند سيرو PHP هو المعتمد، وتطبيقاته المجرّبة
ميدانياً تحل محل إعادة البناء المؤرشفة. سيرو نفسه لم يُمسّ.

الخريطة:
  backend · payment_server · loction_server · ride_server ·
  passenger_server · docker · dashboard · stress_test  → الجذر
  siro_rider  → apps/rider          siro_driver  → apps/driver
  siro_admin  → dashboards/admin    siro_service → dashboards/service
  android_bot → apps/android_bot    socialBot    → apps/socialBot

نُسخ المتعقَّب في git سيرو فقط عبر `git archive` (3,198 ملفاً / ~169 م.ب)
لا `cp -r` — فاستُثنيت مخلفات البناء تلقائياً. بلا أي تعديل محتوى عمداً:
كل ما يلي يصير فرقاً مقروءاً مقابل المصدر.

لم يُستورد وسببه: siromove.com (الموقع التسويقي يبقى marketing/ في تريبز،
سيرو فيه 8 ملفات) · docs و planning (تريبز له docs/ الخاص) · deploy.sh
(ليس نشراً على سيرفر بل `git add . && git push origin --all` — فخّ في
مستودع آخر) · transit_dashboard (بانتظار قرار مصير backend-transit و
dashboards/transit-web).

⚠️ لا يبني بعد — ثلاثة نواقص متوقعة ومقصودة:
1. `.env` و `lib/env/env.g.dart` غير متعقَّبين في سيرو (أسرار لكل مستأجر):
   كل تطبيق فلاتر يحتاج .env خاصاً ثم توليد env.g.dart بـ build_runner.
2. إعدادات Firebase (9 ملفات google-services.json و GoogleService-Info.plist)
   يستبعدها .gitignore تريبز — ولكل مستأجر مشروع Firebase خاص أصلاً.
3. apps/driver في سيرو يشير إلى `../../Intaleq/packages/get` خارج المستودع →
   يجب ضمّ الحزم داخله أسوة بـ apps/rider.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 05:14:13 +03:00

140 lines
6.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../constant/colors.dart';
/// ─────────────────────────────────────────────────────────────────────────
/// Route Planner — Design System
///
/// A single source of truth for the visual language of the ride-planning
/// surface. Inspired by best-in-class ride-hailing apps: calm neutrals,
/// a strong navy primary, and semantic colors for the route timeline
/// (origin = green, stops = amber/violet, destination = red).
///
/// This file is pure presentation. It never touches controllers.
/// ─────────────────────────────────────────────────────────────────────────
class RP {
RP._();
// ── Radii ──────────────────────────────────────────────────────────────
static const double rSheet = 28;
static const double rCard = 20;
static const double rField = 16;
static const double rChip = 14;
static const double rPill = 999;
// ── Motion ─────────────────────────────────────────────────────────────
static const Duration fast = Duration(milliseconds: 180);
static const Duration medium = Duration(milliseconds: 360);
static const Curve ease = Curves.easeOutCubic;
// ── Semantic route colors ──────────────────────────────────────────────
static const Color origin = Color(0xFF16A34A); // green — pickup / start
static const Color destination = Color(0xFFEF4444); // red — drop-off
static const Color stop1 = Color(0xFFF59E0B); // amber — first stop
static const Color stop2 = Color(0xFF7C3AED); // violet — second stop
static Color get brand => AppColor.primaryColor;
static Color stopColor(int index) => index == 0 ? stop1 : stop2;
// ── Surfaces (theme-aware) ─────────────────────────────────────────────
static bool get isDark => Get.isDarkMode;
static Color get sheet =>
isDark ? const Color(0xFF1C1D21) : const Color(0xFFFFFFFF);
static Color get sheetElevated =>
isDark ? const Color(0xFF26272C) : const Color(0xFFFFFFFF);
static Color get fieldFill =>
isDark ? const Color(0xFF2A2B31) : const Color(0xFFF4F5F7);
static Color get chipFill =>
isDark ? const Color(0xFF2A2B31) : const Color(0xFFF1F3F6);
static Color get divider =>
isDark ? const Color(0xFF33343A) : const Color(0xFFECEEF1);
// ── Text ───────────────────────────────────────────────────────────────
static Color get textStrong =>
isDark ? const Color(0xFFF5F6F8) : const Color(0xFF10131A);
static Color get textBody =>
isDark ? const Color(0xFFC7CAD1) : const Color(0xFF3A3F4A);
static Color get textMuted =>
isDark ? const Color(0xFF8A8E98) : const Color(0xFF8B9099);
// ── Elevation ──────────────────────────────────────────────────────────
static List<BoxShadow> get sheetShadow => [
BoxShadow(
color: Colors.black.withValues(alpha: isDark ? 0.45 : 0.12),
blurRadius: 40,
spreadRadius: -6,
offset: const Offset(0, -8),
),
BoxShadow(
color: Colors.black.withValues(alpha: isDark ? 0.30 : 0.06),
blurRadius: 14,
spreadRadius: -4,
offset: const Offset(0, -2),
),
];
static List<BoxShadow> get cardShadow => [
BoxShadow(
color: Colors.black.withValues(alpha: isDark ? 0.35 : 0.08),
blurRadius: 24,
spreadRadius: -8,
offset: const Offset(0, 8),
),
];
static List<BoxShadow> glow(Color c, {double intensity = 0.35}) => [
BoxShadow(
color: c.withValues(alpha: intensity),
blurRadius: 16,
spreadRadius: -2,
offset: const Offset(0, 4),
),
];
// ── Text styles ────────────────────────────────────────────────────────
static TextStyle get title => TextStyle(
fontSize: 18,
fontWeight: FontWeight.w800,
letterSpacing: -0.4,
color: textStrong,
);
static TextStyle get sectionLabel => TextStyle(
fontSize: 12.5,
fontWeight: FontWeight.w700,
letterSpacing: 0.4,
color: textMuted,
);
static TextStyle get fieldValue => TextStyle(
fontSize: 15,
fontWeight: FontWeight.w700,
color: textStrong,
);
static TextStyle get fieldHint => TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
color: textMuted,
);
static TextStyle get body => TextStyle(
fontSize: 13.5,
fontWeight: FontWeight.w500,
color: textBody,
);
// ── Reusable pieces ────────────────────────────────────────────────────
/// A short grabber handle used at the top of sheets.
static Widget grabber() => Container(
width: 42,
height: 5,
decoration: BoxDecoration(
color: isDark ? Colors.white24 : Colors.black12,
borderRadius: BorderRadius.circular(RP.rPill),
),
);
}