34 lines
802 B
Dart
34 lines
802 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
class SplashScreenGif extends StatefulWidget {
|
|
const SplashScreenGif({super.key});
|
|
|
|
@override
|
|
State<SplashScreenGif> createState() => _SplashScreenGifState();
|
|
}
|
|
|
|
class _SplashScreenGifState extends State<SplashScreenGif> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
Future.delayed(const Duration(seconds: 4), () {
|
|
if (mounted) context.go('/login');
|
|
});
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.white,
|
|
body: Center(
|
|
child: Image.asset(
|
|
'assets/vidio/splash.gif',
|
|
fit: BoxFit.contain,
|
|
width: double.infinity,
|
|
height: double.infinity,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |