Chromium Code Reviews| Index: sky/framework/fn.dart |
| diff --git a/sky/framework/fn.dart b/sky/framework/fn.dart |
| index 78672cef03e26a44518c6b2cc199ae49f8ecf27b..b42a691f82f3d3bf1aa62cc9a7d66302e9f1ed84 100644 |
| --- a/sky/framework/fn.dart |
| +++ b/sky/framework/fn.dart |
| @@ -543,6 +543,37 @@ class Container extends SkyElementWrapper { |
| ); |
| } |
| +class FlexContainer extends SkyElementWrapper { |
| + |
| + RenderCSSFlex _root; |
| + RenderCSSFlex _createNode() => new RenderCSSFlex(this, this.direction); |
| + |
| + static final FlexContainer _emptyContainer = new FlexContainer(); |
| + // direction doesn't matter if it's empty |
| + |
| + SkyNodeWrapper get _emptyNode => _emptyContainer; |
| + |
| + final FlexDirection direction; |
| + |
| + FlexContainer({ |
| + Object key, |
| + List<UINode> children, |
| + Style style, |
| + String inlineStyle, |
| + this.direction |
|
eseidel
2015/05/11 22:04:24
Is this OK defaulting to null?
Hixie
2015/05/11 22:06:07
fixed to default to row.
|
| + }) : super( |
| + key: key, |
| + children: children, |
| + style: style, |
| + inlineStyle: inlineStyle |
| + ); |
| + |
| + void _syncNode(UINode old) { |
| + super._syncNode(old); |
| + _root.direction = direction; |
| + } |
| +} |
| + |
| class Image extends SkyElementWrapper { |
| RenderCSSImage _root; |