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> {
|
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);
|
Navigator.pushReplacementNamed(context, widget.nextRoute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,27 +28,29 @@ class WelcomePageState extends State<WelcomePage> {
|
||||||
void initState() {
|
void initState() {
|
||||||
log.d("Initing WelcomePage...");
|
log.d("Initing WelcomePage...");
|
||||||
super.initState();
|
super.initState();
|
||||||
|
SystemChrome.setEnabledSystemUIOverlays([]);
|
||||||
Future.delayed(widget.timeout, _goToNext);
|
Future.delayed(widget.timeout, _goToNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext build) {
|
Widget build(BuildContext build) {
|
||||||
SystemChrome.setEnabledSystemUIOverlays([]);
|
|
||||||
log.d("Building WelcomePage...");
|
log.d("Building WelcomePage...");
|
||||||
return Container(
|
return Material(
|
||||||
color: Colors.green[300],
|
color: Theme.of(context).primaryColor,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Center(
|
Center(
|
||||||
child: Text("Welcome to BotZ",
|
child: Text("Welcome to BotZ",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 15.0,
|
fontSize: 35.0,
|
||||||
color: Colors.blue[700]))),
|
color: Colors.black))),
|
||||||
|
Image.asset('images/simple_logo.png',
|
||||||
|
width: MediaQuery.of(context).size.width * 0.7),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
color: Colors.green[350],
|
color: Colors.green[750],
|
||||||
textColor: Colors.black,
|
textColor: Colors.black,
|
||||||
padding: EdgeInsets.all(8.0),
|
padding: EdgeInsets.all(8.0),
|
||||||
splashColor: Colors.greenAccent,
|
splashColor: Colors.greenAccent,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user