Improved welcome page.

master
blallo 2019-08-27 10:49:23 +02:00
parent 207744774d
commit d4c278cd14
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
1 changed files with 12 additions and 8 deletions

View File

@ -18,7 +18,9 @@ class WelcomePage extends StatefulWidget {
}
class WelcomePageState extends State<WelcomePage> {
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<WelcomePage> {
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: <Widget>[
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,