168 lines
6.3 KiB
Dart
168 lines
6.3 KiB
Dart
import 'package:animated_text_kit/animated_text_kit.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:Intaleq/constant/colors.dart';
|
|
import 'package:Intaleq/constant/style.dart';
|
|
import 'package:Intaleq/constant/box_name.dart';
|
|
import 'package:Intaleq/main.dart';
|
|
|
|
import 'controller/home/splash_screen_controlle.dart';
|
|
|
|
// شاشة بداية بتصميم جديد وحركات وألوان محسّنة
|
|
class SplashScreen extends StatelessWidget {
|
|
const SplashScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// تهيئة الكنترولر
|
|
final SplashScreenController controller = Get.put(SplashScreenController());
|
|
|
|
// تعريف الألوان المستخدمة في حركة اسم التطبيق
|
|
const colorizeColors = [
|
|
Colors.white,
|
|
Color(0xFF89D4CF), // لون تركواز فاتح
|
|
Color(0xFF734AE8), // لون بنفسجي مشرق
|
|
Colors.white,
|
|
];
|
|
|
|
return SafeArea(
|
|
child: Scaffold(
|
|
body: Container(
|
|
// --- تحسين الألوان ---
|
|
// تم استخدام تدرج لوني جديد أكثر حيوية وعصرية
|
|
decoration: const BoxDecoration(
|
|
gradient: LinearGradient(
|
|
begin: Alignment.topLeft,
|
|
end: Alignment.bottomRight,
|
|
colors: [
|
|
Color(0xFF2E3192), // أزرق داكن
|
|
Color(0xFF1BFFFF), // سماوي ساطع
|
|
],
|
|
),
|
|
),
|
|
child: Stack(
|
|
children: [
|
|
// دوائر زخرفية لإضافة عمق للتصميم
|
|
_buildDecorativeCircles(),
|
|
|
|
// المحتوى الرئيسي مع الحركات المتتالية
|
|
Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
// --- حركة اسم التطبيق ---
|
|
// تم إلغاء الشعار واستبداله بحركة نصية ملونة لكلمة "Intaleq"
|
|
FadeTransition(
|
|
opacity: controller.titleFadeAnimation,
|
|
child: ScaleTransition(
|
|
scale: controller.titleScaleAnimation,
|
|
child: AnimatedTextKit(
|
|
animatedTexts: [
|
|
ColorizeAnimatedText(
|
|
'Intaleq',
|
|
textStyle: AppStyle.headTitle.copyWith(
|
|
fontSize: 65.0, // تكبير حجم الخط
|
|
fontWeight: FontWeight.bold,
|
|
shadows: [
|
|
const Shadow(
|
|
blurRadius: 15.0,
|
|
color: Colors.black38,
|
|
offset: Offset(0, 3.0),
|
|
),
|
|
],
|
|
),
|
|
colors: colorizeColors,
|
|
speed: const Duration(milliseconds: 300),
|
|
),
|
|
],
|
|
isRepeatingAnimation: false,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 18),
|
|
|
|
// --- حركة الشعار النصي ---
|
|
FadeTransition(
|
|
opacity: controller.taglineFadeAnimation,
|
|
child: SlideTransition(
|
|
position: controller.taglineSlideAnimation,
|
|
child: Text(
|
|
'Your Journey Begins Here'.tr,
|
|
style: AppStyle.title.copyWith(
|
|
color: AppColor.writeColor.withOpacity(0.9),
|
|
fontSize: 18,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
|
|
// قسم سفلي لشريط التقدم ومعلومات الإصدار
|
|
Align(
|
|
alignment: Alignment.bottomCenter,
|
|
child: FadeTransition(
|
|
opacity: controller.footerFadeAnimation,
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(
|
|
bottom: 40.0, left: 40, right: 40),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
ClipRRect(
|
|
borderRadius: BorderRadius.circular(10),
|
|
child: Obx(() => LinearProgressIndicator(
|
|
value: controller.progress.value,
|
|
backgroundColor:
|
|
AppColor.writeColor.withOpacity(0.2),
|
|
valueColor: const AlwaysStoppedAnimation<Color>(
|
|
AppColor.writeColor),
|
|
minHeight: 5,
|
|
)),
|
|
),
|
|
const SizedBox(height: 20),
|
|
Text(
|
|
'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}',
|
|
style: AppStyle.subtitle.copyWith(
|
|
color: AppColor.writeColor.withOpacity(0.7),
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
/// بناء دوائر زخرفية لتحسين الخلفية
|
|
Widget _buildDecorativeCircles() {
|
|
return Stack(
|
|
children: [
|
|
Positioned(
|
|
top: -80,
|
|
left: -100,
|
|
child: CircleAvatar(
|
|
radius: 120,
|
|
backgroundColor: Colors.white.withOpacity(0.05),
|
|
),
|
|
),
|
|
Positioned(
|
|
bottom: -120,
|
|
right: -150,
|
|
child: CircleAvatar(
|
|
radius: 180,
|
|
backgroundColor: Colors.white.withOpacity(0.07),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|