Index: sky/examples/rendering/sector_layout.dart |
diff --git a/sky/examples/rendering/sector_layout.dart b/sky/examples/rendering/sector_layout.dart |
index b17b31b98cee3d9d61ebcfbfed6565fe313be2c4..85dcc41691f603735023bbd517748b90112e78ec 100644 |
--- a/sky/examples/rendering/sector_layout.dart |
+++ b/sky/examples/rendering/sector_layout.dart |
@@ -75,6 +75,17 @@ abstract class RenderSector extends RenderObject { |
} |
SectorConstraints get constraints => super.constraints; |
+ bool debugDoesMeetConstraints() { |
+ assert(constraints != null); |
+ assert(deltaRadius != null); |
+ assert(deltaRadius < double.INFINITY); |
+ assert(deltaTheta != null); |
+ assert(deltaTheta < double.INFINITY); |
+ return constraints.minDeltaRadius <= deltaRadius && |
+ deltaRadius <= math.max(constraints.minDeltaRadius, constraints.maxDeltaRadius) && |
+ constraints.minDeltaTheta <= deltaTheta && |
+ deltaTheta <= math.max(constraints.minDeltaTheta, constraints.maxDeltaTheta); |
+ } |
void performResize() { |
// default behaviour for subclasses that have sizedByParent = true |
deltaRadius = constraints.constrainDeltaRadius(0.0); |