New gallery app bar background (#4539)

This commit is contained in:
Hans Muller 2016-06-13 12:41:29 -07:00 committed by GitHub
parent 2099d3789c
commit 187ff00294
7 changed files with 12 additions and 6 deletions

View File

@ -11,7 +11,7 @@ dependencies:
flutter_gallery_assets: flutter_gallery_assets:
git: git:
url: https://flutter.googlesource.com/gallery-assets url: https://flutter.googlesource.com/gallery-assets
ref: 5c9118f9e6005c9fef6f1a340e5c475494c2ba80 ref: ea2c9c344c8b6b318341590e2af0707f8a6649f1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

View File

@ -9,7 +9,7 @@ dependencies:
flutter_gallery_assets: flutter_gallery_assets:
git: git:
url: https://flutter.googlesource.com/gallery-assets url: https://flutter.googlesource.com/gallery-assets
ref: 5c9118f9e6005c9fef6f1a340e5c475494c2ba80 ref: ea2c9c344c8b6b318341590e2af0707f8a6649f1
dev_dependencies: dev_dependencies:
test: any # flutter_test provides the version constraints test: any # flutter_test provides the version constraints

View File

@ -8,6 +8,7 @@ assets:
- assets/section_components.png - assets/section_components.png
- assets/section_patterns.png - assets/section_patterns.png
- assets/section_usability.png - assets/section_usability.png
- packages/flutter_gallery_assets/appbar_background.jpg
- packages/flutter_gallery_assets/pesto/avatar.jpg - packages/flutter_gallery_assets/pesto/avatar.jpg
- packages/flutter_gallery_assets/pesto/image10.jpg - packages/flutter_gallery_assets/pesto/image10.jpg
- packages/flutter_gallery_assets/pesto/image11.jpg - packages/flutter_gallery_assets/pesto/image11.jpg

View File

@ -34,7 +34,7 @@ class IconsDemoState extends State<IconsDemo> {
Colors.blueGrey Colors.blueGrey
]; ];
int iconColorIndex = 2; int iconColorIndex = 9; // green
double iconOpacity = 1.0; double iconOpacity = 1.0;
Color get iconColor => iconColorSwatches[iconColorIndex][400]; Color get iconColor => iconColorSwatches[iconColorIndex][400];

View File

@ -46,12 +46,12 @@ final Map<String, WidgetBuilder> kRoutes = <String, WidgetBuilder>{
final ThemeData _kGalleryLightTheme = new ThemeData( final ThemeData _kGalleryLightTheme = new ThemeData(
brightness: Brightness.light, brightness: Brightness.light,
primarySwatch: Colors.purple primarySwatch: Colors.green
); );
final ThemeData _kGalleryDarkTheme = new ThemeData( final ThemeData _kGalleryDarkTheme = new ThemeData(
brightness: Brightness.dark, brightness: Brightness.dark,
primarySwatch: Colors.purple primarySwatch: Colors.green
); );
class GalleryApp extends StatefulWidget { class GalleryApp extends StatefulWidget {

View File

@ -59,6 +59,11 @@ class GalleryHomeState extends State<GalleryHome> {
appBar: new AppBar( appBar: new AppBar(
expandedHeight: _kFlexibleSpaceMaxHeight, expandedHeight: _kFlexibleSpaceMaxHeight,
flexibleSpace: new FlexibleSpaceBar( flexibleSpace: new FlexibleSpaceBar(
background: new AssetImage(
name: 'packages/flutter_gallery_assets/appbar_background.jpg',
fit: ImageFit.cover,
height: _kFlexibleSpaceMaxHeight
),
title: new Text('Flutter gallery') title: new Text('Flutter gallery')
) )
), ),

View File

@ -13,7 +13,7 @@ dependencies:
flutter_gallery_assets: flutter_gallery_assets:
git: git:
url: https://flutter.googlesource.com/gallery-assets url: https://flutter.googlesource.com/gallery-assets
ref: 5c9118f9e6005c9fef6f1a340e5c475494c2ba80 ref: ea2c9c344c8b6b318341590e2af0707f8a6649f1
dev_dependencies: dev_dependencies:
test: any # flutter_test provides the version constraints test: any # flutter_test provides the version constraints