insertBefore method
Insert node
as a child of the current node, before refNode
in the
Implementation
void insertBefore(Node node, Node? refNode) {
if (refNode == null) {
nodes.add(node);
} else {
nodes.insert(nodes.indexOf(refNode), node);
}
}