Skip to content

Instantly share code, notes, and snippets.

@VB10
Created July 9, 2019 20:17
Show Gist options
  • Select an option

  • Save VB10/f3889c0737fe840262e2bd5af277d569 to your computer and use it in GitHub Desktop.

Select an option

Save VB10/f3889c0737fe840262e2bd5af277d569 to your computer and use it in GitHub Desktop.
Splash View
class _SplashViewState extends State<SplashView> {
@override
void initState() {
super.initState();
_navigateToHomePage();
}
@override
Widget build(BuildContext context) {
_screenUtilInit();
return Scaffold(
body: _centerWidget,
);
}
void _navigateToHomePage() {
Future.delayed(Duration(milliseconds: UIHelper.SPLASH_DURATION), () {
Navigator.of(context).pushNamed("/onboard");
});
}
void _screenUtilInit() => ScreenUtil().init(context);
Widget get _centerWidget => Center(
child: _helthoImages,
);
Widget get _helthoImages => Image.asset(UIHelper.HEALTHO_ICON);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment