visitChildrenForSemantics method Null safety
- RenderObjectVisitor visitor
override
Called when collecting the semantics of this node.
The implementation has to return the children in paint order skipping all children that are not semantically relevant (e.g. because they are invisible).
The default implementation mirrors the behavior of visitChildren (which is supposed to walk all the children).
Implementation
@override
void visitChildrenForSemantics(RenderObjectVisitor visitor) {
childrenInPaintOrder
.where((RenderSliver sliver) => sliver.geometry!.visible || sliver.geometry!.cacheExtent > 0.0)
.forEach(visitor);
}