Agrega PRIVACY.md, actualiza AGENTS.md

This commit is contained in:
Super User
2026-06-14 15:34:53 -04:00
parent 9ac9e9e953
commit 0df1bf90cf
20 changed files with 685 additions and 166 deletions

View File

@@ -11,10 +11,39 @@ class SplashScreen extends StatefulWidget {
State<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
class _SplashScreenState extends State<SplashScreen>
with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation<double> _scaleAnim;
late Animation<double> _fadeAnim;
late Animation<Offset> _slideAnim;
@override
void initState() {
super.initState();
_controller = AnimationController(
duration: const Duration(milliseconds: 800),
vsync: this,
);
_scaleAnim = Tween<double>(begin: 0.5, end: 1.0).animate(
CurvedAnimation(parent: _controller, curve: Curves.elasticOut),
);
_fadeAnim = Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(
parent: _controller,
curve: const Interval(0.3, 0.7, curve: Curves.easeIn),
),
);
_slideAnim = Tween<Offset>(
begin: const Offset(0, 0.3),
end: Offset.zero,
).animate(
CurvedAnimation(
parent: _controller,
curve: const Interval(0.4, 0.8, curve: Curves.easeOutCubic),
),
);
_controller.forward();
_init();
}
@@ -22,6 +51,7 @@ class _SplashScreenState extends State<SplashScreen> {
await NotificationService.instance.init();
await context.read<ConfiguracionProvider>().cargarConfiguracion();
await NotificationService.instance.scheduleRecordatorios();
await Future.delayed(const Duration(milliseconds: 1200));
if (mounted) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (_) => const DashboardScreen()),
@@ -29,21 +59,75 @@ class _SplashScreenState extends State<SplashScreen> {
}
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
return Scaffold(
backgroundColor: Theme.of(context).colorScheme.primary,
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.home_rounded, size: 80, color: Theme.of(context).colorScheme.onPrimary),
const SizedBox(height: 16),
Text('HogarControl',
style: TextStyle(fontSize: 28, fontWeight: FontWeight.bold, color: Theme.of(context).colorScheme.onPrimary)),
const SizedBox(height: 24),
CircularProgressIndicator(color: Theme.of(context).colorScheme.onPrimary),
],
body: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
colorScheme.primary,
colorScheme.primaryContainer,
],
),
),
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ScaleTransition(
scale: _scaleAnim,
child: Icon(
Icons.home_rounded,
size: 80,
color: colorScheme.onPrimary,
),
),
FadeTransition(
opacity: _fadeAnim,
child: SlideTransition(
position: _slideAnim,
child: Column(
children: [
const SizedBox(height: 16),
Text(
'Factura del Hogar',
style: TextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
color: colorScheme.onPrimary,
),
),
const SizedBox(height: 8),
Text(
'Controla tus gastos del hogar',
style: TextStyle(
fontSize: 14,
color: colorScheme.onPrimary.withValues(alpha: 0.8),
),
),
],
),
),
),
const SizedBox(height: 48),
FadeTransition(
opacity: _fadeAnim,
child: CircularProgressIndicator(
color: colorScheme.onPrimary,
),
),
],
),
),
),
);