Commit 56ccfc4e authored by Hans Muller's avatar Hans Muller

ToolBar withSizeOffsets() is now withPadding()

parent 24d2e691
...@@ -48,15 +48,15 @@ class Scaffold extends StatelessComponent { ...@@ -48,15 +48,15 @@ class Scaffold extends StatelessComponent {
final Widget floatingActionButton; final Widget floatingActionButton;
Widget build(BuildContext context) { Widget build(BuildContext context) {
final offsetToolBar = toolBar?.withSizeOffsets(new EdgeDims.only(top: ui.window.padding.top)); final ToolBar paddedToolBar = toolBar?.withPadding(new EdgeDims.only(top: ui.window.padding.top));
final Widget materialBody = body != null ? new Material(child: body) : null; final Widget materialBody = body != null ? new Material(child: body) : null;
Widget toolBarAndBody; Widget toolBarAndBody;
if (offsetToolBar != null && materialBody != null) if (paddedToolBar != null && materialBody != null)
toolBarAndBody = new CustomMultiChildLayout(<Widget>[materialBody, offsetToolBar], toolBarAndBody = new CustomMultiChildLayout(<Widget>[materialBody, paddedToolBar],
delegate: _toolBarAndBodyLayout delegate: _toolBarAndBodyLayout
); );
else else
toolBarAndBody = offsetToolBar ?? materialBody; toolBarAndBody = paddedToolBar ?? materialBody;
final List<Widget> bottomColumnChildren = <Widget>[]; final List<Widget> bottomColumnChildren = <Widget>[];
......
...@@ -21,7 +21,7 @@ class ToolBar extends StatelessComponent { ...@@ -21,7 +21,7 @@ class ToolBar extends StatelessComponent {
this.level: 2, this.level: 2,
this.backgroundColor, this.backgroundColor,
this.textTheme, this.textTheme,
this.sizeOffsets: EdgeDims.zero this.padding: EdgeDims.zero
}) : super(key: key); }) : super(key: key);
final Widget left; final Widget left;
...@@ -31,9 +31,9 @@ class ToolBar extends StatelessComponent { ...@@ -31,9 +31,9 @@ class ToolBar extends StatelessComponent {
final int level; final int level;
final Color backgroundColor; final Color backgroundColor;
final TextTheme textTheme; final TextTheme textTheme;
final EdgeDims sizeOffsets; final EdgeDims padding;
ToolBar withSizeOffsets(EdgeDims offsets) { ToolBar withPadding(EdgeDims newPadding) {
return new ToolBar( return new ToolBar(
key: key, key: key,
left: left, left: left,
...@@ -43,7 +43,7 @@ class ToolBar extends StatelessComponent { ...@@ -43,7 +43,7 @@ class ToolBar extends StatelessComponent {
level: level, level: level,
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
textTheme: textTheme, textTheme: textTheme,
sizeOffsets: offsets padding: newPadding
); );
} }
...@@ -99,7 +99,7 @@ class ToolBar extends StatelessComponent { ...@@ -99,7 +99,7 @@ class ToolBar extends StatelessComponent {
), ),
child: new DefaultTextStyle( child: new DefaultTextStyle(
style: sideStyle, style: sideStyle,
child: new Container(padding: sizeOffsets, child: new Column(columnChildren, justifyContent: FlexJustifyContent.collapse)) child: new Container(padding: padding, child: new Column(columnChildren, justifyContent: FlexJustifyContent.collapse))
) )
); );
......
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