Files
shaynee-flutter/lib/screens/splash_screen.dart
mav 6311088256 redesign: duolingo-pattern onboarding, no gradient, pressable button
- Nunito font replacing Plus Jakarta Sans
- SButton: Stack-based 3D pressable (dark shadow layer + top layer translates on press)
- SCard: flat border-based selection, no shadows
- SProgressBar: 4px thin bar, animated fill
- All screens: white bg, no gradients
- Duolingo layout: illustration top zone, content below, sticky button
2026-05-28 16:34:04 +02:00

74 lines
2.1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import '../theme.dart';
import 'intro_screen.dart';
class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
@override
State<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
super.initState();
Future.delayed(const Duration(milliseconds: 2400), _goNext);
}
void _goNext() {
if (!mounted) return;
Navigator.of(context).pushReplacement(
PageRouteBuilder(
pageBuilder: (_, a, __) => const IntroScreen(),
transitionsBuilder: (_, a, __, child) =>
FadeTransition(opacity: a, child: child),
transitionDuration: const Duration(milliseconds: 400),
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: SColors.bgSurface,
body: SafeArea(
child: Column(
children: [
const Spacer(flex: 2),
// Mascot — centered, large
Image.asset(
'assets/images/shaynee_hero.png',
height: 260,
fit: BoxFit.contain,
)
.animate()
.fadeIn(duration: 600.ms, delay: 200.ms)
.slideY(begin: 0.08, end: 0, duration: 600.ms, curve: Curves.easeOut),
const SizedBox(height: 32),
// Wordmark
Text(
'shaynee',
style: SText.headline1(SColors.textHead).copyWith(
fontSize: 42,
letterSpacing: -0.5,
),
)
.animate()
.fadeIn(duration: 500.ms, delay: 500.ms),
const SizedBox(height: 8),
Text(
'your ai skincare companion',
style: SText.subtitle(SColors.textSub),
)
.animate()
.fadeIn(duration: 500.ms, delay: 700.ms),
const Spacer(flex: 3),
],
),
),
);
}
}