2026-04-06 redesign splash screen and drawer menu
This commit is contained in:
@@ -18,6 +18,7 @@ import '../functions/encrypt_decrypt.dart';
|
||||
|
||||
class SplashScreenController extends GetxController
|
||||
with GetTickerProviderStateMixin {
|
||||
// ─── انيميشن الـ splash الأصلي ───────────────────────────────────────────
|
||||
late AnimationController _animationController;
|
||||
late Animation<double> titleFadeAnimation,
|
||||
titleScaleAnimation,
|
||||
@@ -25,38 +26,67 @@ class SplashScreenController extends GetxController
|
||||
footerFadeAnimation;
|
||||
late Animation<Offset> taglineSlideAnimation;
|
||||
|
||||
// ─── انيميشن الحلقات المدارية ────────────────────────────────────────────
|
||||
late AnimationController _orbitController;
|
||||
late Animation<double> orbitAnimation;
|
||||
|
||||
// ─── انيميشن التوهج المتنفّس ─────────────────────────────────────────────
|
||||
late AnimationController _glowController;
|
||||
late Animation<double> glowAnimation;
|
||||
|
||||
final progress = 0.0.obs;
|
||||
Timer? _progressTimer;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
|
||||
// ── الكنترولر الرئيسي للـ splash ─────────────────────────────────────
|
||||
_animationController = AnimationController(
|
||||
vsync: this, duration: const Duration(milliseconds: 2000));
|
||||
|
||||
// Animation definitions
|
||||
titleFadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(
|
||||
parent: _animationController,
|
||||
curve: const Interval(0.0, 0.5, curve: Curves.easeOut)));
|
||||
|
||||
titleScaleAnimation = Tween<double>(begin: 0.8, end: 1.0).animate(
|
||||
CurvedAnimation(
|
||||
parent: _animationController,
|
||||
curve: const Interval(0.0, 0.5, curve: Curves.easeOut)));
|
||||
|
||||
taglineFadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(
|
||||
parent: _animationController,
|
||||
curve: const Interval(0.3, 0.8, curve: Curves.easeOut)));
|
||||
|
||||
taglineSlideAnimation =
|
||||
Tween<Offset>(begin: const Offset(0, 0.5), end: Offset.zero).animate(
|
||||
CurvedAnimation(
|
||||
parent: _animationController,
|
||||
curve: const Interval(0.3, 0.8, curve: Curves.easeOut)));
|
||||
|
||||
footerFadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(
|
||||
parent: _animationController,
|
||||
curve: const Interval(0.5, 1.0, curve: Curves.easeOut)));
|
||||
|
||||
// ── كنترولر الدوران المداري — دورة كاملة كل 7 ثوانٍ ─────────────────
|
||||
_orbitController =
|
||||
AnimationController(vsync: this, duration: const Duration(seconds: 7))
|
||||
..repeat();
|
||||
|
||||
orbitAnimation =
|
||||
Tween<double>(begin: 0.0, end: 1.0).animate(_orbitController);
|
||||
|
||||
// ── كنترولر التوهج المتنفّس — نبضة كل ثانيتين ───────────────────────
|
||||
_glowController = AnimationController(
|
||||
vsync: this, duration: const Duration(milliseconds: 2000))
|
||||
..repeat(reverse: true);
|
||||
|
||||
glowAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _glowController, curve: Curves.easeInOut));
|
||||
|
||||
_animationController.forward();
|
||||
_initializeApp();
|
||||
}
|
||||
@@ -191,6 +221,8 @@ class SplashScreenController extends GetxController
|
||||
void onClose() {
|
||||
_progressTimer?.cancel();
|
||||
_animationController.dispose();
|
||||
_orbitController.dispose();
|
||||
_glowController.dispose();
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user