SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class SplashScren extends StatefulWidget {
  2.   @override
  3.   _SplashScrenState createState() => _SplashScrenState();
  4. }
  5.  
  6. class _SplashScrenState extends State<SplashScren> {
  7.   startTime() async {
  8.     return new Timer(Duration(milliseconds: 4500), navigatorPage);
  9.   }
  10.  
  11.   /// To navigate layout change
  12.   void navigatorPage() {
  13.     Navigator.push(context,
  14.         MaterialPageRoute(builder: (BuildContext context) => OnBoardingPage()));
  15.   }
  16.  
  17.   @override
  18.   void initState() {
  19.     super.initState();
  20.     startTime();
  21.   }
  22.  
  23.   @override
  24.   Widget build(BuildContext context) {
  25.     return Scaffold(
  26.       body: Center(
  27.         child: Card(
  28.           child: Container(
  29.             width: 70,
  30.             height: 70,
  31.             padding: EdgeInsets.all(12),
  32.             child: Image.asset('assets/dlogo.png'),
  33.           ),
  34.         ),
  35.       ),
  36.     );
  37.   }
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top