Make the suspended gallery task bar gray (#5651)

This commit is contained in:
Hans Muller
2016-08-29 14:59:10 -07:00
committed by GitHub
parent c76decb842
commit 119758b822
2 changed files with 11 additions and 1 deletions

View File

@@ -75,6 +75,7 @@ class GalleryAppState extends State<GalleryApp> {
return new MaterialApp(
title: 'Flutter Gallery',
color: Colors.grey[500],
theme: _useLightTheme ? _kGalleryLightTheme : _kGalleryDarkTheme,
showPerformanceOverlay: _showPerformanceOverlay,
routes: _kRoutes,

View File

@@ -48,6 +48,7 @@ class MaterialApp extends StatefulWidget {
MaterialApp({
Key key,
this.title,
this.color,
this.theme,
this.home,
this.routes: const <String, WidgetBuilder>{},
@@ -85,6 +86,13 @@ class MaterialApp extends StatefulWidget {
/// must be able to build a widget for that route.
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.
///
/// When a named route is pushed with [Navigator.pushNamed], the route name is
@@ -221,7 +229,8 @@ class _MaterialAppState extends State<MaterialApp> {
key: new GlobalObjectKey(this),
title: config.title,
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,
onGenerateRoute: _onGenerateRoute,
onLocaleChanged: config.onLocaleChanged,