withChildren method
Rebuilds itself with a new list of child nodes. The order and number of child nodes must match the return value of children. Leaf nodes return themselves.
Implementation
@override
LatexNode withChildren(List<LatexNode> newChildren) {
int idx = 0;
final newSub = subscript != null ? newChildren[idx++] : null;
final newSup = superscript != null ? newChildren[idx] : null;
return BigOperatorNode(
operator,
subscript: newSub,
superscript: newSup,
limitsMode: limitsMode,
limitsInDisplay: limitsInDisplay,
sourceRange: sourceRange,
);
}