25-10-2/1

This commit is contained in:
Hamza-Ayed
2025-10-02 01:19:38 +03:00
parent f08ee61a7e
commit 95fb065bdb
43 changed files with 13917 additions and 13426 deletions

View File

@@ -14,11 +14,10 @@ class SplashScreen extends StatelessWidget {
final textTheme = Theme.of(context).textTheme;
final size = MediaQuery.of(context).size;
// Define our new green color palette here
const Color primaryGreen = Color(0xFF1A535C);
const Color secondaryGreen = Color(0xFF4ECDC4);
const Color logoBackgroundColor = Colors.white;
const Color logoIconColor = primaryGreen;
// 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(
@@ -30,90 +29,105 @@ class SplashScreen extends StatelessWidget {
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
primaryGreen,
secondaryGreen,
primaryDark,
secondaryDark,
],
),
),
child: Stack(
children: [
// Centered Logo and Slogan with Animation
// Center-aligned animated content
Center(
child: AnimatedBuilder(
animation: splashScreenController.animation,
builder: (context, child) => FadeTransition(
opacity: splashScreenController.animation,
child: Transform.translate(
offset: Offset(
0, 50 * (1 - splashScreenController.animation.value)),
child: child,
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// Elegant and Clear Logo
Container(
padding: const EdgeInsets.all(25),
decoration: const BoxDecoration(
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: logoBackgroundColor,
color: Colors.white.withOpacity(0.95),
boxShadow: [
BoxShadow(
color: Colors.black26,
blurRadius: 10,
offset: Offset(0, 4),
)
]),
child: Image.asset('assets/images/logo.gif'),
),
const SizedBox(height: 24),
// App Name - now using a variable for color
Text(
'Intaleq', // Replace with AppInformation.appName if needed
style: textTheme.headlineMedium?.copyWith(
color: textColor,
fontWeight: FontWeight.bold,
letterSpacing: 2,
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: 12),
// Slogan - now using a variable for color
Text(
'Your Journey Begins Here'.tr,
style: textTheme.titleMedium?.copyWith(
color: textColor.withOpacity(0.9),
),
),
const SizedBox(height: 30),
// App Name and Slogan with staggered animation
_AnimatedText(
text: 'Intaleq', // 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 Loading Bar and Version Info
// Bottom Version Info and Progress Bar
Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding: EdgeInsets.only(
bottom: size.height * 0.05, left: 40, right: 40),
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: textColor.withOpacity(0.2),
valueColor:
const AlwaysStoppedAnimation<Color>(textColor),
minHeight: 5,
),
)),
const SizedBox(height: 16),
Text(
'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}',
style: textTheme.bodySmall?.copyWith(
color: textColor.withOpacity(0.7),
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,
),
),
),
],
@@ -126,3 +140,40 @@ class SplashScreen extends StatelessWidget {
);
}
}
/// 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),
),
);
}
}