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 {
final Widget floatingActionButton;
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;
Widget toolBarAndBody;
if (offsetToolBar != null && materialBody != null)
toolBarAndBody = new CustomMultiChildLayout(<Widget>[materialBody, offsetToolBar],
if (paddedToolBar != null && materialBody != null)
toolBarAndBody = new CustomMultiChildLayout(<Widget>[materialBody, paddedToolBar],
delegate: _toolBarAndBodyLayout
);
else
toolBarAndBody = offsetToolBar ?? materialBody;
toolBarAndBody = paddedToolBar ?? materialBody;
final List<Widget> bottomColumnChildren = <Widget>[];
......
......@@ -21,7 +21,7 @@ class ToolBar extends StatelessComponent {
this.level: 2,
this.backgroundColor,
this.textTheme,
this.sizeOffsets: EdgeDims.zero
this.padding: EdgeDims.zero
}) : super(key: key);
final Widget left;
......@@ -31,9 +31,9 @@ class ToolBar extends StatelessComponent {
final int level;
final Color backgroundColor;
final TextTheme textTheme;
final EdgeDims sizeOffsets;
final EdgeDims padding;
ToolBar withSizeOffsets(EdgeDims offsets) {
ToolBar withPadding(EdgeDims newPadding) {
return new ToolBar(
key: key,
left: left,
......@@ -43,7 +43,7 @@ class ToolBar extends StatelessComponent {
level: level,
backgroundColor: backgroundColor,
textTheme: textTheme,
sizeOffsets: offsets
padding: newPadding
);
}
......@@ -99,7 +99,7 @@ class ToolBar extends StatelessComponent {
),
child: new DefaultTextStyle(
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