use accept to add a child
void accept(SpanNode? node) { if (node != null) children.add(node); node?._acceptParent(this); }