mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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.
This commit is contained in:
parent
5bbcf6d4fc
commit
8a77036b35
@ -101,9 +101,8 @@ class ShrinePageState extends State<ShrinePage> {
|
||||
)
|
||||
)
|
||||
),
|
||||
title: new Center(
|
||||
child: new Text('SHRINE', style: ShrineTheme.of(context).appBarTitleStyle)
|
||||
),
|
||||
title: new Text('SHRINE', style: ShrineTheme.of(context).appBarTitleStyle),
|
||||
centerTitle: true,
|
||||
actions: <Widget>[
|
||||
new IconButton(
|
||||
icon: const Icon(Icons.shopping_cart),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user