diff --git a/engine/src/flutter/examples/lib/solid_color_box.dart b/engine/src/flutter/examples/lib/solid_color_box.dart index ae008e3931..9c650ce396 100644 --- a/engine/src/flutter/examples/lib/solid_color_box.dart +++ b/engine/src/flutter/examples/lib/solid_color_box.dart @@ -13,8 +13,20 @@ class RenderSolidColorBox extends RenderDecoratedBox { : backgroundColor = backgroundColor, super(decoration: new BoxDecoration(backgroundColor: backgroundColor)); - Size getIntrinsicDimensions(BoxConstraints constraints) { - return constraints.constrain(desiredSize); + double getMinIntrinsicWidth(BoxConstraints constraints) { + return constraints.constrainWidth(desiredSize.width); + } + + double getMaxIntrinsicWidth(BoxConstraints constraints) { + return constraints.constrainWidth(desiredSize.width); + } + + double getMinIntrinsicHeight(BoxConstraints constraints) { + return constraints.constrainHeight(desiredSize.height); + } + + double getMaxIntrinsicHeight(BoxConstraints constraints) { + return constraints.constrainHeight(desiredSize.height); } void performLayout() { diff --git a/engine/src/flutter/tests/raw/render_flex.dart b/engine/src/flutter/tests/raw/render_flex.dart index 85be795132..29adc86583 100644 --- a/engine/src/flutter/tests/raw/render_flex.dart +++ b/engine/src/flutter/tests/raw/render_flex.dart @@ -20,8 +20,20 @@ class RenderSolidColor extends RenderDecoratedBox { super(decoration: new BoxDecoration(backgroundColor: backgroundColor)) { } - sky.Size getIntrinsicDimensions(BoxConstraints constraints) { - return constraints.constrain(desiredSize); + double getMinIntrinsicWidth(BoxConstraints constraints) { + return constraints.constrainWidth(desiredSize.width); + } + + double getMaxIntrinsicWidth(BoxConstraints constraints) { + return constraints.constrainWidth(desiredSize.width); + } + + double getMinIntrinsicHeight(BoxConstraints constraints) { + return constraints.constrainHeight(desiredSize.height); + } + + double getMaxIntrinsicHeight(BoxConstraints constraints) { + return constraints.constrainHeight(desiredSize.height); } void performLayout() {