chore: add build artifacts, map assets, and routing data
This commit is contained in:
@@ -0,0 +1,164 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import '../../core/constants/app_colors.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import '../map/map_view.dart';
|
||||
import '../onboarding/onboarding_view.dart';
|
||||
|
||||
class SplashView extends StatefulWidget {
|
||||
const SplashView({super.key});
|
||||
|
||||
@override
|
||||
State<SplashView> createState() => _SplashViewState();
|
||||
}
|
||||
|
||||
class _SplashViewState extends State<SplashView> with SingleTickerProviderStateMixin {
|
||||
late AnimationController _animController;
|
||||
late Animation<double> _scaleAnimation;
|
||||
late Animation<double> _fadeAnimation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_animController = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 1400),
|
||||
);
|
||||
|
||||
_scaleAnimation = Tween<double>(begin: 0.85, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _animController, curve: Curves.easeOutCubic),
|
||||
);
|
||||
|
||||
_fadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _animController, curve: Curves.easeIn),
|
||||
);
|
||||
|
||||
_animController.forward();
|
||||
|
||||
Future.delayed(const Duration(milliseconds: 2400), () async {
|
||||
if (mounted) {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final hasSeen = prefs.getBool('has_seen_onboarding') ?? false;
|
||||
final targetWidget = hasSeen ? const MapView() : const OnboardingView();
|
||||
|
||||
if (mounted) {
|
||||
Navigator.of(context).pushReplacement(
|
||||
PageRouteBuilder(
|
||||
pageBuilder: (context, anim, secAnim) => targetWidget,
|
||||
transitionsBuilder: (context, animation, secAnim, child) =>
|
||||
FadeTransition(opacity: animation, child: child),
|
||||
transitionDuration: const Duration(milliseconds: 600),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_animController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.canvasLight,
|
||||
body: Center(
|
||||
child: FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: ScaleTransition(
|
||||
scale: _scaleAnimation,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// Luxury Emblem Container
|
||||
Container(
|
||||
width: 108,
|
||||
height: 108,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.pureWhite,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Color(0x1F0071E3),
|
||||
blurRadius: 36,
|
||||
offset: Offset(0, 12),
|
||||
),
|
||||
BoxShadow(
|
||||
color: Color(0x14000000),
|
||||
blurRadius: 20,
|
||||
offset: Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
child: Image.asset(
|
||||
'assets/images/siro_maps_logo.png',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
// App Title
|
||||
Text(
|
||||
'خرائط سيرو',
|
||||
style: GoogleFonts.alexandria(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: AppColors.textPrimary,
|
||||
letterSpacing: -0.5,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
// Subtitle
|
||||
Text(
|
||||
'Siro Maps • منظومة السيادة المكانية',
|
||||
style: GoogleFonts.alexandria(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.textMuted,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
// Pill Version Badge
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 6),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.surfaceMuted,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(color: AppColors.borderSubtle),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
width: 7,
|
||||
height: 7,
|
||||
decoration: const BoxDecoration(
|
||||
color: AppColors.tacticalEmerald,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'🇯🇴 سيادة مكانية 100% • v2.4 PRO',
|
||||
style: GoogleFonts.alexandria(
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.textSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user