import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:penyaluran_app/app/routes/app_pages.dart'; import 'package:penyaluran_app/app/theme/app_theme.dart'; class SplashView extends StatefulWidget { const SplashView({Key? key}) : super(key: key); @override State createState() => _SplashViewState(); } class _SplashViewState extends State { @override void initState() { super.initState(); _navigateToLogin(); } _navigateToLogin() async { await Future.delayed(const Duration(seconds: 2)); Get.offAllNamed(Routes.login); } @override Widget build(BuildContext context) { return Scaffold( body: Container( decoration: BoxDecoration( gradient: AppTheme.primaryGradient, ), child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset( 'assets/images/logo.png', width: 120, height: 120, errorBuilder: (context, error, stackTrace) { return Container( width: 120, height: 120, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(20), ), child: const Icon( Icons.people, size: 60, color: AppTheme.primaryColor, ), ); }, ), const SizedBox(height: 24), const Text( 'Aplikasi Penyaluran', style: TextStyle( fontSize: 24, fontWeight: FontWeight.bold, color: Colors.white, ), ), const SizedBox(height: 8), const Text( 'Bantuan Sosial', style: TextStyle( fontSize: 18, color: Colors.white, ), ), const SizedBox(height: 48), const CircularProgressIndicator( valueColor: AlwaysStoppedAnimation(Colors.white), ), ], ), ), ), ); } }