Skip to content

Instantly share code, notes, and snippets.

@fatihhcan
Created September 4, 2020 15:57
Show Gist options
  • Save fatihhcan/a670b7fba20aeed6995eff69fde0027c to your computer and use it in GitHub Desktop.
Save fatihhcan/a670b7fba20aeed6995eff69fde0027c to your computer and use it in GitHub Desktop.
class SplashView extends StatefulWidget {
SplashView({Key key}) : super(key: key);
@override
_SplashViewState createState() => _SplashViewState();
}
class _SplashViewState extends State<SplashView> {
String assetImage = "asset/splash.gif";
@override
void initState() {
super.initState();
Future.delayed(
Duration(
seconds: 3,
), () {
Navigator.pushNamed(context, '/home');
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: Center(
child: Image.asset(assetImage),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment