From 187ff002942a90d7409c79e456832de3fc0a8d4e Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Mon, 13 Jun 2016 12:41:29 -0700 Subject: [PATCH] New gallery app bar background (#4539) --- dev/benchmarks/complex_layout/pubspec.yaml | 2 +- dev/manual_tests/pubspec.yaml | 2 +- examples/flutter_gallery/flutter.yaml | 1 + examples/flutter_gallery/lib/demo/icons_demo.dart | 2 +- examples/flutter_gallery/lib/gallery/app.dart | 4 ++-- examples/flutter_gallery/lib/gallery/home.dart | 5 +++++ examples/flutter_gallery/pubspec.yaml | 2 +- 7 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dev/benchmarks/complex_layout/pubspec.yaml b/dev/benchmarks/complex_layout/pubspec.yaml index 3512cb5905..eb4355ef69 100644 --- a/dev/benchmarks/complex_layout/pubspec.yaml +++ b/dev/benchmarks/complex_layout/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: flutter_gallery_assets: git: url: https://flutter.googlesource.com/gallery-assets - ref: 5c9118f9e6005c9fef6f1a340e5c475494c2ba80 + ref: ea2c9c344c8b6b318341590e2af0707f8a6649f1 dev_dependencies: flutter_test: diff --git a/dev/manual_tests/pubspec.yaml b/dev/manual_tests/pubspec.yaml index 7ebbd8ab10..35a922b938 100644 --- a/dev/manual_tests/pubspec.yaml +++ b/dev/manual_tests/pubspec.yaml @@ -9,7 +9,7 @@ dependencies: flutter_gallery_assets: git: url: https://flutter.googlesource.com/gallery-assets - ref: 5c9118f9e6005c9fef6f1a340e5c475494c2ba80 + ref: ea2c9c344c8b6b318341590e2af0707f8a6649f1 dev_dependencies: test: any # flutter_test provides the version constraints diff --git a/examples/flutter_gallery/flutter.yaml b/examples/flutter_gallery/flutter.yaml index dd9054770e..aff5c3c403 100644 --- a/examples/flutter_gallery/flutter.yaml +++ b/examples/flutter_gallery/flutter.yaml @@ -8,6 +8,7 @@ assets: - assets/section_components.png - assets/section_patterns.png - assets/section_usability.png + - packages/flutter_gallery_assets/appbar_background.jpg - packages/flutter_gallery_assets/pesto/avatar.jpg - packages/flutter_gallery_assets/pesto/image10.jpg - packages/flutter_gallery_assets/pesto/image11.jpg diff --git a/examples/flutter_gallery/lib/demo/icons_demo.dart b/examples/flutter_gallery/lib/demo/icons_demo.dart index 941c744bcd..b9cb1ce3f1 100644 --- a/examples/flutter_gallery/lib/demo/icons_demo.dart +++ b/examples/flutter_gallery/lib/demo/icons_demo.dart @@ -34,7 +34,7 @@ class IconsDemoState extends State { Colors.blueGrey ]; - int iconColorIndex = 2; + int iconColorIndex = 9; // green double iconOpacity = 1.0; Color get iconColor => iconColorSwatches[iconColorIndex][400]; diff --git a/examples/flutter_gallery/lib/gallery/app.dart b/examples/flutter_gallery/lib/gallery/app.dart index 3bf3af0784..c1d489e0c6 100644 --- a/examples/flutter_gallery/lib/gallery/app.dart +++ b/examples/flutter_gallery/lib/gallery/app.dart @@ -46,12 +46,12 @@ final Map kRoutes = { final ThemeData _kGalleryLightTheme = new ThemeData( brightness: Brightness.light, - primarySwatch: Colors.purple + primarySwatch: Colors.green ); final ThemeData _kGalleryDarkTheme = new ThemeData( brightness: Brightness.dark, - primarySwatch: Colors.purple + primarySwatch: Colors.green ); class GalleryApp extends StatefulWidget { diff --git a/examples/flutter_gallery/lib/gallery/home.dart b/examples/flutter_gallery/lib/gallery/home.dart index 2e8dd22802..ef10c82592 100644 --- a/examples/flutter_gallery/lib/gallery/home.dart +++ b/examples/flutter_gallery/lib/gallery/home.dart @@ -59,6 +59,11 @@ class GalleryHomeState extends State { appBar: new AppBar( expandedHeight: _kFlexibleSpaceMaxHeight, flexibleSpace: new FlexibleSpaceBar( + background: new AssetImage( + name: 'packages/flutter_gallery_assets/appbar_background.jpg', + fit: ImageFit.cover, + height: _kFlexibleSpaceMaxHeight + ), title: new Text('Flutter gallery') ) ), diff --git a/examples/flutter_gallery/pubspec.yaml b/examples/flutter_gallery/pubspec.yaml index 55485c5883..83b9105933 100644 --- a/examples/flutter_gallery/pubspec.yaml +++ b/examples/flutter_gallery/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: flutter_gallery_assets: git: url: https://flutter.googlesource.com/gallery-assets - ref: 5c9118f9e6005c9fef6f1a340e5c475494c2ba80 + ref: ea2c9c344c8b6b318341590e2af0707f8a6649f1 dev_dependencies: test: any # flutter_test provides the version constraints