Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: sky/sdk/lib/rendering/flex.dart

Issue 1231203002: Make RenderFlex support taking children in the constructor. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/flex.dart
diff --git a/sky/sdk/lib/rendering/flex.dart b/sky/sdk/lib/rendering/flex.dart
index 5f8f6e38991470dbc33cdc6388bee27b6e2f5806..0a6573c7391e72665b06a2407fd66900f447d49f 100644
--- a/sky/sdk/lib/rendering/flex.dart
+++ b/sky/sdk/lib/rendering/flex.dart
@@ -42,10 +42,16 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
// lays out RenderBox children using flexible layout
RenderFlex({
+ List<RenderBox> children,
FlexDirection direction: FlexDirection.horizontal,
FlexJustifyContent justifyContent: FlexJustifyContent.start,
FlexAlignItems alignItems: FlexAlignItems.center
- }) : _direction = direction, _justifyContent = justifyContent, _alignItems = alignItems;
+ }) : _direction = direction,
+ _justifyContent = justifyContent,
+ _alignItems = alignItems {
+ addAll(children);
+ }
+
FlexDirection _direction;
FlexDirection get direction => _direction;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698