From 8a77036b35a614c14857fb6a500bdcd3eafc864d Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 14 Dec 2017 16:53:30 -0800 Subject: [PATCH] Center Shrine demo title with centerTitle (#13586) Rather than use a Center widget, center the title using AppBar's centerTitle property. This ensures the title is horizontally centred with respect to the screen rather than centred in the space between the leading and trailing app bar widgets, which are asymmetrical in Shrine. --- examples/flutter_gallery/lib/demo/shrine/shrine_page.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/flutter_gallery/lib/demo/shrine/shrine_page.dart b/examples/flutter_gallery/lib/demo/shrine/shrine_page.dart index d6c401860af..b3761ea2f42 100644 --- a/examples/flutter_gallery/lib/demo/shrine/shrine_page.dart +++ b/examples/flutter_gallery/lib/demo/shrine/shrine_page.dart @@ -101,9 +101,8 @@ class ShrinePageState extends State { ) ) ), - title: new Center( - child: new Text('SHRINE', style: ShrineTheme.of(context).appBarTitleStyle) - ), + title: new Text('SHRINE', style: ShrineTheme.of(context).appBarTitleStyle), + centerTitle: true, actions: [ new IconButton( icon: const Icon(Icons.shopping_cart),