findWithBoundaries method
Returns the outermost group created by wrapElement around child,
or child itself if it has none.
Returns null if child isn't in this list, possibly inside groups.
Implementation
ChildNode? findWithBoundaries(MarkupRenderObject child) {
if (!_contains(child)) return null;
ChildNode outermost = child;
for (var list = child._owner!; !identical(list, this); list = list._host._owner!) {
if (list._host case final _BoundaryGroup group when identical(group.subject, child)) {
outermost = group;
}
}
return outermost;
}