From 18c86c7867e8193ef058224e711fa1f812d5f41c Mon Sep 17 00:00:00 2001 From: "Randal L. Schwartz" Date: Sat, 14 Mar 2026 12:29:15 -0700 Subject: [PATCH] Fixes issues #45, #46, and #48: Unbounded stretch crash, accessibility order, and doc typo --- boxy/lib/src/boxy/custom_boxy_base.dart | 25 +++++++++++--- boxy/lib/src/boxy_flex.dart | 45 +++++++++++++++++++++---- website/docs/custom-boxy/boxy-id.md | 2 +- 3 files changed, 60 insertions(+), 12 deletions(-) diff --git a/boxy/lib/src/boxy/custom_boxy_base.dart b/boxy/lib/src/boxy/custom_boxy_base.dart index b1c630a..b29e9db 100644 --- a/boxy/lib/src/boxy/custom_boxy_base.dart +++ b/boxy/lib/src/boxy/custom_boxy_base.dart @@ -236,11 +236,9 @@ mixin RenderBoxyMixin< @override void visitChildrenForSemantics(RenderObjectVisitor visitor) { - for (final child in childHandleMap.values) { - if (!child._ignore) { - visitor(child.render); - } - } + wrapPhase(BoxyDelegatePhase.semantics, () { + delegate.visitChildrenForSemantics(visitor); + }); } @override @@ -293,6 +291,9 @@ enum BoxyDelegatePhase { /// The boxy is currently being hit test. hitTest, + + /// Semantics are being visited. + semantics, } /// Cache for [Layer] objects, used by [BoxyLayerContext] methods. @@ -913,6 +914,20 @@ abstract class BaseBoxyDelegate _hasOverflow ? Offset.zero & size : null; diff --git a/website/docs/custom-boxy/boxy-id.md b/website/docs/custom-boxy/boxy-id.md index 87964c1..5d54dde 100644 --- a/website/docs/custom-boxy/boxy-id.md +++ b/website/docs/custom-boxy/boxy-id.md @@ -48,7 +48,7 @@ class MyBoxyDelegate extends BoxyDelegate { // Return the size of our little column. return Size( - max(helloSize.width, worldSize.height), + max(helloSize.width, worldSize.width), helloSize.height + worldSize.height, ); }