addChild method
adds a child-node to this node at an optional position. Triggers a recalc of node indices
Implementation
void addChild(NodeV2 node, [int? position]) {
if (position == null) {
children.add(node);
} else {
children.insert(position, node);
}
_recalcIndices();
}