Files
tripz-llc/apps/driver/lib/splash_screen_page.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

180 lines
6.2 KiB
Dart
Executable File

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:siro_driver/constant/box_name.dart';
import 'controller/home/splash_screen_controlle.dart';
import 'main.dart';
class SplashScreen extends StatelessWidget {
const SplashScreen({super.key});
@override
Widget build(BuildContext context) {
final SplashScreenController splashScreenController =
Get.put(SplashScreenController());
final textTheme = Theme.of(context).textTheme;
final size = MediaQuery.of(context).size;
// A modern, elegant color palette
const Color primaryDark = Color(0xFF0D1B2A);
const Color secondaryDark = Color(0xFF1B263B);
const Color accentColor = Color(0xFF4ECDC4);
const Color textColor = Colors.white;
return Scaffold(
body: Container(
width: double.infinity,
height: double.infinity,
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
primaryDark,
secondaryDark,
],
),
),
child: Stack(
children: [
// Center-aligned animated content
Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// Logo with Scale and Fade animation
ScaleTransition(
scale: splashScreenController.animation,
child: FadeTransition(
opacity: splashScreenController.animation,
child: Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white.withOpacity(0.95),
boxShadow: [
BoxShadow(
color: accentColor.withOpacity(0.2),
blurRadius: 25,
spreadRadius: 5,
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Image.asset(
'assets/images/logo.gif',
width: size.width * 0.3, // Responsive size
height: size.width * 0.3,
),
),
),
),
),
const SizedBox(height: 30),
// App Name and Slogan with staggered animation
_AnimatedText(
text: 'Siro', // Your App Name
animation: splashScreenController.animation,
style: textTheme.headlineMedium?.copyWith(
color: textColor,
fontWeight: FontWeight.bold,
letterSpacing: 3,
),
beginOffset: const Offset(0, 0.5),
),
const SizedBox(height: 12),
_AnimatedText(
text: 'Your Journey Begins Here'.tr,
animation: splashScreenController.animation,
style: textTheme.titleMedium?.copyWith(
color: textColor.withOpacity(0.8),
fontWeight: FontWeight.w300,
),
beginOffset: const Offset(0, 0.8),
startDelay: 0.2, // Start after the title
),
],
),
),
// Bottom Version Info and Progress Bar
Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding: EdgeInsets.only(
bottom: size.height * 0.06,
left: 40,
right: 40,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Obx(
() => ClipRRect(
borderRadius: BorderRadius.circular(10),
child: LinearProgressIndicator(
value: splashScreenController.progress.value,
backgroundColor: primaryDark.withOpacity(0.5),
valueColor:
const AlwaysStoppedAnimation<Color>(accentColor),
minHeight: 6,
),
),
),
const SizedBox(height: 20),
GetBuilder<SplashScreenController>(
builder: (controller) => Text(
'Version: ${controller.packageInfo.isNotEmpty ? controller.packageInfo : '...'}',
style: textTheme.bodySmall?.copyWith(
color: textColor.withOpacity(0.5),
letterSpacing: 1,
),
),
),
],
),
),
),
],
),
),
);
}
}
/// A helper widget for creating staggered text animations.
class _AnimatedText extends StatelessWidget {
const _AnimatedText({
required this.animation,
required this.text,
required this.style,
required this.beginOffset,
this.startDelay = 0.0,
});
final Animation<double> animation;
final String text;
final TextStyle? style;
final Offset beginOffset;
final double startDelay;
@override
Widget build(BuildContext context) {
return FadeTransition(
opacity: CurvedAnimation(
parent: animation,
curve: Interval(startDelay, 1.0, curve: Curves.easeOut),
),
child: SlideTransition(
position: Tween<Offset>(
begin: beginOffset,
end: Offset.zero,
).animate(CurvedAnimation(
parent: animation,
curve: Interval(startDelay, 1.0, curve: Curves.easeOut),
)),
child: Text(text, style: style),
),
);
}
}