Commit 9b582ace authored by Adam Barth's avatar Adam Barth

Merge pull request #2914 from abarth/app_bar_padding

Fix app bar padding without leading widget
parents 9e6e522b 5c5948bb
......@@ -134,16 +134,18 @@ class AppBar extends StatelessWidget {
}
final List<Widget> toolBarRow = <Widget>[];
if (leading != null)
toolBarRow.add(leading);
toolBarRow.add(
new Flexible(
child: new Padding(
padding: new EdgeInsets.only(left: 24.0),
child: title != null ? new DefaultTextStyle(style: centerStyle, child: title) : null
)
if (leading != null) {
toolBarRow.add(new Padding(
padding: new EdgeInsets.only(right: 16.0),
child: leading
));
}
toolBarRow.add(new Flexible(
child: new Padding(
padding: new EdgeInsets.only(left: 8.0),
child: title != null ? new DefaultTextStyle(style: centerStyle, child: title) : null
)
);
));
if (actions != null)
toolBarRow.addAll(actions);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment