From d4c278cd142e99c51a7bc6c59ef38893fd62359e Mon Sep 17 00:00:00 2001 From: blallo Date: Tue, 27 Aug 2019 10:49:23 +0200 Subject: [PATCH] Improved welcome page. --- lib/ui/welcome_page.dart | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/ui/welcome_page.dart b/lib/ui/welcome_page.dart index a27147c..9219835 100644 --- a/lib/ui/welcome_page.dart +++ b/lib/ui/welcome_page.dart @@ -18,7 +18,9 @@ class WelcomePage extends StatefulWidget { } class WelcomePageState extends State { - void _goToNext() { + void _goToNext() async { + // Restore overlays to exit fullscreen mode + await SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); Navigator.pushReplacementNamed(context, widget.nextRoute); } @@ -26,27 +28,29 @@ class WelcomePageState extends State { void initState() { log.d("Initing WelcomePage..."); super.initState(); + SystemChrome.setEnabledSystemUIOverlays([]); Future.delayed(widget.timeout, _goToNext); } @override Widget build(BuildContext build) { - SystemChrome.setEnabledSystemUIOverlays([]); log.d("Building WelcomePage..."); - return Container( - color: Colors.green[300], + return Material( + color: Theme.of(context).primaryColor, child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Center( child: Text("Welcome to BotZ", textAlign: TextAlign.center, style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 15.0, - color: Colors.blue[700]))), + fontSize: 35.0, + color: Colors.black))), + Image.asset('images/simple_logo.png', + width: MediaQuery.of(context).size.width * 0.7), FlatButton( - color: Colors.green[350], + color: Colors.green[750], textColor: Colors.black, padding: EdgeInsets.all(8.0), splashColor: Colors.greenAccent,