croupier: Add Better Splash Screen
The splash screen was blatantly copied from
https://vanadium-review.googlesource.com/#/c/18335
(The Syncslides Flutter Splash screen)
Change-Id: I39b9f674a5f2708f006128d30abb19b769442326
diff --git a/images/splash/background.png b/images/splash/background.png
new file mode 100644
index 0000000..4812cbb
--- /dev/null
+++ b/images/splash/background.png
Binary files differ
diff --git a/images/splash/flutter.png b/images/splash/flutter.png
new file mode 100644
index 0000000..0f468b6
--- /dev/null
+++ b/images/splash/flutter.png
Binary files differ
diff --git a/images/splash/vanadium.png b/images/splash/vanadium.png
new file mode 100644
index 0000000..6da0b2a
--- /dev/null
+++ b/images/splash/vanadium.png
Binary files differ
diff --git a/lib/components/main_route.dart b/lib/components/main_route.dart
index 4cbcf4d..509f5d9 100644
--- a/lib/components/main_route.dart
+++ b/lib/components/main_route.dart
@@ -50,9 +50,22 @@
// TODO(alexfandrianto): Can we do better than this?
Widget _buildSplashScreen() {
- return new Container(
- decoration: style.Box.liveNow,
- child: new Text("Loading Croupier...", style: style.Text.titleStyle));
+ var stack = new Stack([
+ new AssetImage(name: 'images/splash/background.png', fit: ImageFit.cover),
+ new Row([
+ new AssetImage(
+ name: 'images/splash/flutter.png', width: style.Size.splashLogo),
+ new AssetImage(
+ name: 'images/splash/vanadium.png', width: style.Size.splashLogo)
+ ], justifyContent: FlexJustifyContent.center),
+ new Container(
+ child: new Row(
+ [new Text('Loading Croupier...', style: style.Text.splash)],
+ alignItems: FlexAlignItems.end,
+ justifyContent: FlexJustifyContent.center),
+ padding: style.Spacing.normalPadding)
+ ]);
+ return stack;
}
void _showDrawer() {
diff --git a/lib/styles/common.dart b/lib/styles/common.dart
index 73e731b..b2ee9ed 100644
--- a/lib/styles/common.dart
+++ b/lib/styles/common.dart
@@ -19,22 +19,16 @@
static final TextStyle largeStyle = new TextStyle(fontSize: 24.0);
static final TextStyle largeRedStyle =
new TextStyle(fontSize: 24.0, color: errorTextColor);
+ static final TextStyle splash =
+ new TextStyle(fontSize: 16.0, color: Colors.white);
}
class Size {
- static const double thumbnailWidth = 250.0;
- static const double listHeight = 150.0;
- static const double thumbnailNavHeight = 150.0;
- static const double thumbnailNavWidth = 267.0;
+ static const double splashLogo = 75.0;
}
class Spacing {
- static final EdgeDims extraSmallPadding = new EdgeDims.all(2.0);
- static final EdgeDims smallPadding = new EdgeDims.all(5.0);
static final EdgeDims normalPadding = new EdgeDims.all(10.0);
- static final EdgeDims normalMargin = new EdgeDims.all(2.0);
- static final EdgeDims listItemMargin = new EdgeDims.TRBL(3.0, 6.0, 0.0, 6.0);
- static final EdgeDims thumbnailNavMargin = new EdgeDims.all(3.0);
}
class Box {
diff --git a/manifest.yaml b/manifest.yaml
index 07fe25a..f9e8c92 100644
--- a/manifest.yaml
+++ b/manifest.yaml
@@ -231,3 +231,6 @@
- images/avatars/player1.jpeg
- images/avatars/player2.jpeg
- images/avatars/player3.jpeg
+ - images/splash/background.png
+ - images/splash/flutter.png
+ - images/splash/vanadium.png