- 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
74 lines
2.1 KiB
Dart
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),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|