insertBefore method
Insert an element
in the children list before the node before
Implementation
int insertBefore(IndexedNode before, IndexedNode element) {
final index = children.indexWhere((node) => node.key == before.key);
if (index < 0) throw NodeNotFoundException.fromNode(before);
insert(index, element);
return index;
}