No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

splash_screen.dart 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import 'dart:async';
  2. import 'package:flutter/material.dart';
  3. //import 'package:hris_selfservice_mobile/Screens/ForgotPassword/forgotPassword_screen.dart';
  4. import 'package:hris_selfservice_mobile/Screens/Login/login_screen.dart';
  5. class Splash extends StatefulWidget {
  6. const Splash({Key? key}) : super(key: key);
  7. @override
  8. _SplashState createState() => _SplashState();
  9. }
  10. class _SplashState extends State<Splash> {
  11. @override
  12. void initState() {
  13. super.initState();
  14. Timer(
  15. Duration(seconds: 5),
  16. () => Navigator.pushReplacement(
  17. context, MaterialPageRoute(builder: (context) => LoginView())));
  18. }
  19. @override
  20. Widget build(BuildContext context) {
  21. return Scaffold(
  22. body: Container(
  23. width: double.infinity,
  24. height: double.infinity,
  25. decoration: BoxDecoration(
  26. gradient: LinearGradient(
  27. begin: Alignment.topRight,
  28. end: Alignment.bottomRight,
  29. colors: [Color(0xFFFF9844),
  30. Color(0xFFFE8853),
  31. Color(0xFFFD7267),])),
  32. child: Center(
  33. child: Column(
  34. mainAxisAlignment: MainAxisAlignment.center,
  35. crossAxisAlignment: CrossAxisAlignment.center,
  36. children: [
  37. Image.asset(
  38. 'assets/images/logo.png',
  39. height: 300,
  40. width: 300,
  41. )
  42. ],
  43. ),
  44. )),
  45. );
  46. }
  47. }