From 119758b822f3064025ab5a83fdd0e58c78296e4c Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Mon, 29 Aug 2016 14:59:10 -0700 Subject: [PATCH] Make the suspended gallery task bar gray (#5651) --- examples/flutter_gallery/lib/gallery/app.dart | 1 + packages/flutter/lib/src/material/app.dart | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/flutter_gallery/lib/gallery/app.dart b/examples/flutter_gallery/lib/gallery/app.dart index fc8649f955..08b42167b2 100644 --- a/examples/flutter_gallery/lib/gallery/app.dart +++ b/examples/flutter_gallery/lib/gallery/app.dart @@ -75,6 +75,7 @@ class GalleryAppState extends State { return new MaterialApp( title: 'Flutter Gallery', + color: Colors.grey[500], theme: _useLightTheme ? _kGalleryLightTheme : _kGalleryDarkTheme, showPerformanceOverlay: _showPerformanceOverlay, routes: _kRoutes, diff --git a/packages/flutter/lib/src/material/app.dart b/packages/flutter/lib/src/material/app.dart index 7d0fdc2a76..0d919ca3c8 100644 --- a/packages/flutter/lib/src/material/app.dart +++ b/packages/flutter/lib/src/material/app.dart @@ -48,6 +48,7 @@ class MaterialApp extends StatefulWidget { MaterialApp({ Key key, this.title, + this.color, this.theme, this.home, this.routes: const {}, @@ -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 { 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,