diff --git a/framework/components/action_bar.dart b/framework/components/action_bar.dart index f874009412c..309fb9b8661 100644 --- a/framework/components/action_bar.dart +++ b/framework/components/action_bar.dart @@ -16,8 +16,9 @@ class ActionBar extends Component { padding-top: ${kStatusBarHeight}px;'''); static Style _centerStyle = new Style(''' - padding-left: 24px; - flex: 1;'''); + padding-left: 24px;'''); + + static FlexBoxParentData _centerLayoutSettings = new FlexBoxParentData()..flex = 1; UINode left; UINode center; @@ -31,7 +32,7 @@ class ActionBar extends Component { }) : super(key: key); UINode build() { - List children = [left, new StyleNode(center, _centerStyle)]; + List children = [left, new StyleNode(new ParentDataNode(center, _centerLayoutSettings), _centerStyle)]; if (right != null) children.addAll(right); diff --git a/framework/fn.dart b/framework/fn.dart index 1a1118c07e5..29caedab927 100644 --- a/framework/fn.dart +++ b/framework/fn.dart @@ -148,6 +148,12 @@ class StyleNode extends ContentNode { StyleNode(UINode content, this.style): super(content); } +class ParentDataNode extends ContentNode { + final ParentData parentData; + + ParentDataNode(UINode content, this.parentData): super(content); +} + /* * SkyNodeWrappers correspond to a desired state of a RenderCSS. They are fully * immutable, with one exception: A UINode which is a Component which lives within @@ -389,14 +395,28 @@ abstract class SkyElementWrapper extends SkyNodeWrapper { List