diff --git a/packages/flutter/lib/rendering/stack.dart b/packages/flutter/lib/rendering/stack.dart index ff477fc34e..8b7a2b7a27 100644 --- a/packages/flutter/lib/rendering/stack.dart +++ b/packages/flutter/lib/rendering/stack.dart @@ -38,12 +38,13 @@ class RenderStack extends RenderBox with ContainerRenderObjectMixin= 0.0 && x + child.size.width <= size.width); + + if (x < 0.0 || x + child.size.width > size.width) + _hasVisualOverflow = true; double y = 0.0; if (childData.top != null) y = childData.top; else if (childData.bottom != null) y = size.height - childData.bottom - child.size.height; - assert(y >= 0.0 && y + child.size.height <= size.height); + + if (y < 0.0 || y + child.size.height > size.height) + _hasVisualOverflow = true; childData.position = new Point(x, y); } @@ -196,6 +202,13 @@ class RenderStack extends RenderBox with ContainerRenderObjectMixin