Last active
November 28, 2020 08:26
-
-
Save littleironical/4cec8001cf3212a02b8983f5a97e306c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:orderac/screens/root.dart'; | |
class SplashScreen extends StatefulWidget { | |
@override | |
_SplashScreenState createState() => _SplashScreenState(); | |
} | |
class _SplashScreenState extends State<SplashScreen> { | |
@override | |
void initState() { | |
super.initState(); | |
Timer( | |
Duration(milliseconds: 1500), | |
() => Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => Root())) | |
); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.white, | |
body: Center( | |
child: SizedBox(height: 60.0, width: 60.0, | |
child: Image.asset('assets/icon/icon.png') | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment