nicer looking splash screen, removed unintentional addition of back (to splash screen) button
This commit is contained in:
parent
0969b41bc3
commit
55e8c828a4
3 changed files with 24 additions and 14 deletions
|
@ -34,7 +34,7 @@ void main() {
|
|||
|
||||
title: "Buypeeb Mobile",
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.orange,
|
||||
primarySwatch: Colors.pink,
|
||||
),
|
||||
)
|
||||
),
|
||||
|
|
|
@ -9,13 +9,7 @@ class RouteHome extends StatelessWidget {
|
|||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: "Buypeeb",
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.orange,
|
||||
),
|
||||
home: MainPage(),
|
||||
);
|
||||
return MainPage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,9 @@ class RouteSplash extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _RouteSplashState extends State<RouteSplash> {
|
||||
bool _ready = false;
|
||||
|
||||
_loadUserSettings() async {
|
||||
// sleep for a bit to "simulate" loading
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
await Future.delayed(Duration(seconds: 2));
|
||||
// add some random stuff to the listings
|
||||
var listings = context.read<UserListings>();
|
||||
var _rng = new Random();
|
||||
|
@ -28,8 +26,11 @@ class _RouteSplashState extends State<RouteSplash> {
|
|||
}
|
||||
|
||||
setState(() {
|
||||
_ready = true;
|
||||
Navigator.pushNamed(context, '/');
|
||||
Navigator.pushNamedAndRemoveUntil(
|
||||
context,
|
||||
'/',
|
||||
(Route<dynamic> route) => false,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -43,7 +44,22 @@ class _RouteSplashState extends State<RouteSplash> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.all(12.0),
|
||||
child: Text(
|
||||
"Buypeeb Mobile",
|
||||
style: TextStyle(
|
||||
fontSize: 36.0,
|
||||
fontWeight: FontWeight.w200
|
||||
),
|
||||
),
|
||||
),
|
||||
CircularProgressIndicator(),
|
||||
]
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue