Improved welcome page.
This commit is contained in:
parent
207744774d
commit
d4c278cd14
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user