// lib/screens/splash/splash_screen.dart import 'dart:async'; import 'package:flutter/material.dart'; import '../main_screen.dart'; class SplashScreen extends StatefulWidget { const SplashScreen({super.key}); @override State createState() => _SplashScreenState(); } class _SplashScreenState extends State { @override void initState() { super.initState(); // delay 2 detik lalu ke halaman utama Timer(const Duration(seconds: 2), () { Navigator.pushReplacement( context, MaterialPageRoute(builder: (context) => const MainScreen()), ); }); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.green[700], body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ const Icon(Icons.bug_report, size: 80, color: Colors.white), const SizedBox(height: 20), const Text( 'HamaGuard', style: TextStyle( color: Colors.white, fontSize: 28, fontWeight: FontWeight.bold, ), ), const SizedBox(height: 10), CircularProgressIndicator( valueColor: AlwaysStoppedAnimation(Colors.white), ), ], ), ), ); } }