Keep the two ConstrainedBox classes together
@abarth
This commit is contained in:
parent
c06995a379
commit
b25488cead
@ -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 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user