From ac4ad3bc98f0faeca34fce5f46cda4a81e64dd1d Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Thu, 12 May 2016 16:45:45 -0700 Subject: [PATCH] Flexible space bar demo needs to occupy more vertical space, etc (#3890) --- .../lib/demo/flexible_space_demo.dart | 61 +++++++++++++++++-- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/examples/flutter_gallery/lib/demo/flexible_space_demo.dart b/examples/flutter_gallery/lib/demo/flexible_space_demo.dart index d63b082144..a11e839a0e 100644 --- a/examples/flutter_gallery/lib/demo/flexible_space_demo.dart +++ b/examples/flutter_gallery/lib/demo/flexible_space_demo.dart @@ -124,10 +124,25 @@ class FlexibleSpaceDemoState extends State { ], flexibleSpace: new FlexibleSpaceBar( title : new Text('Ali Connors'), - background: new AssetImage( - name: 'packages/flutter_gallery_assets/ali_connors.png', - fit: ImageFit.cover, - height: _appBarHeight + background: new Stack( + children: [ + new AssetImage( + name: 'packages/flutter_gallery_assets/ali_connors.png', + fit: ImageFit.cover, + height: _appBarHeight + ), + // This gradient ensures that the toolbar icons are distinct + // against the background image. + new DecoratedBox( + decoration: new BoxDecoration( + gradient: new LinearGradient( + begin: const FractionalOffset(0.5, 0.0), + end: const FractionalOffset(0.5, 0.30), + colors: [const Color(0x60000000), const Color(0x00000000)] + ) + ) + ) + ] ) ) ), @@ -150,7 +165,14 @@ class FlexibleSpaceDemoState extends State { '(323) 555-6789', 'Work' ] - ) + ), + new _ContactItem( + icon: Icons.message, + lines: [ + '(650) 555-6789', + 'Home' + ] + ), ] ), new _ContactCategory( @@ -195,6 +217,35 @@ class FlexibleSpaceDemoState extends State { ] ) ] + ), + new _ContactCategory( + icon: Icons.today, + children: [ + new _ContactItem( + lines: [ + 'Birthday', + 'January 9th, 1989' + ] + ), + new _ContactItem( + lines: [ + 'Wedding anniversary', + 'June 21st, 2014' + ] + ), + new _ContactItem( + lines: [ + 'First day in office', + 'January 20th, 2015' + ] + ), + new _ContactItem( + lines: [ + 'Last day in office', + 'August 9th, 2015' + ] + ) + ] ) ] )