Commit 119758b8 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Make the suspended gallery task bar gray (#5651)

parent c76decb8
...@@ -75,6 +75,7 @@ class GalleryAppState extends State<GalleryApp> { ...@@ -75,6 +75,7 @@ class GalleryAppState extends State<GalleryApp> {
return new MaterialApp( return new MaterialApp(
title: 'Flutter Gallery', title: 'Flutter Gallery',
color: Colors.grey[500],
theme: _useLightTheme ? _kGalleryLightTheme : _kGalleryDarkTheme, theme: _useLightTheme ? _kGalleryLightTheme : _kGalleryDarkTheme,
showPerformanceOverlay: _showPerformanceOverlay, showPerformanceOverlay: _showPerformanceOverlay,
routes: _kRoutes, routes: _kRoutes,
......
...@@ -48,6 +48,7 @@ class MaterialApp extends StatefulWidget { ...@@ -48,6 +48,7 @@ class MaterialApp extends StatefulWidget {
MaterialApp({ MaterialApp({
Key key, Key key,
this.title, this.title,
this.color,
this.theme, this.theme,
this.home, this.home,
this.routes: const <String, WidgetBuilder>{}, this.routes: const <String, WidgetBuilder>{},
...@@ -85,6 +86,13 @@ class MaterialApp extends StatefulWidget { ...@@ -85,6 +86,13 @@ class MaterialApp extends StatefulWidget {
/// must be able to build a widget for that route. /// must be able to build a widget for that route.
final Widget home; final Widget home;
/// The primary color to use for the application in the operating system
/// interface.
///
/// For example, on Android this is the color used for the application in the
/// application switcher.
final Color color;
/// The application's top-level routing table. /// The application's top-level routing table.
/// ///
/// When a named route is pushed with [Navigator.pushNamed], the route name is /// When a named route is pushed with [Navigator.pushNamed], the route name is
...@@ -221,7 +229,8 @@ class _MaterialAppState extends State<MaterialApp> { ...@@ -221,7 +229,8 @@ class _MaterialAppState extends State<MaterialApp> {
key: new GlobalObjectKey(this), key: new GlobalObjectKey(this),
title: config.title, title: config.title,
textStyle: _errorTextStyle, textStyle: _errorTextStyle,
color: theme?.primaryColor ?? Colors.blue[500], // blue[500] is the primary color of the default theme // blue[500] is the primary color of the default theme
color: config.color ?? theme?.primaryColor ?? Colors.blue[500],
navigatorObserver: _heroController, navigatorObserver: _heroController,
onGenerateRoute: _onGenerateRoute, onGenerateRoute: _onGenerateRoute,
onLocaleChanged: config.onLocaleChanged, onLocaleChanged: config.onLocaleChanged,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment