Keep the two ConstrainedBox classes together

@abarth
This commit is contained in:
Ian Hickson 2015-09-30 22:25:54 -07:00
parent c06995a379
commit b25488cead

View File

@ -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 {
OverflowBox({ Key key, this.minWidth, this.maxWidth, this.minHeight, this.maxHeight, Widget child })
: super(key: key, child: child);
@ -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 {
AspectRatio({ Key key, this.aspectRatio, Widget child })
: super(key: key, child: child) {