Commit b25488ce authored by Ian Hickson's avatar Ian Hickson

Keep the two ConstrainedBox classes together

@abarth
parent c06995a3
...@@ -229,6 +229,21 @@ class SizedBox extends OneChildRenderObjectWidget { ...@@ -229,6 +229,21 @@ class SizedBox extends OneChildRenderObjectWidget {
} }
} }
class ConstrainedBox extends OneChildRenderObjectWidget {
ConstrainedBox({ Key key, this.constraints, Widget child })
: super(key: key, child: child) {
assert(constraints != null);
}
final BoxConstraints constraints;
RenderConstrainedBox createRenderObject() => new RenderConstrainedBox(additionalConstraints: constraints);
void updateRenderObject(RenderConstrainedBox renderObject, ConstrainedBox oldWidget) {
renderObject.additionalConstraints = constraints;
}
}
class OverflowBox extends OneChildRenderObjectWidget { class OverflowBox extends OneChildRenderObjectWidget {
OverflowBox({ Key key, this.minWidth, this.maxWidth, this.minHeight, this.maxHeight, Widget child }) OverflowBox({ Key key, this.minWidth, this.maxWidth, this.minHeight, this.maxHeight, Widget child })
: super(key: key, child: child); : super(key: key, child: child);
...@@ -253,21 +268,6 @@ class OverflowBox extends OneChildRenderObjectWidget { ...@@ -253,21 +268,6 @@ class OverflowBox extends OneChildRenderObjectWidget {
} }
} }
class ConstrainedBox extends OneChildRenderObjectWidget {
ConstrainedBox({ Key key, this.constraints, Widget child })
: super(key: key, child: child) {
assert(constraints != null);
}
final BoxConstraints constraints;
RenderConstrainedBox createRenderObject() => new RenderConstrainedBox(additionalConstraints: constraints);
void updateRenderObject(RenderConstrainedBox renderObject, ConstrainedBox oldWidget) {
renderObject.additionalConstraints = constraints;
}
}
class AspectRatio extends OneChildRenderObjectWidget { class AspectRatio extends OneChildRenderObjectWidget {
AspectRatio({ Key key, this.aspectRatio, Widget child }) AspectRatio({ Key key, this.aspectRatio, Widget child })
: super(key: key, child: child) { : super(key: key, child: child) {
......
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