insertBefore function
Inserts newNode as a child of parent before sibling.
Implementation
bool insertBefore(FNode parent, FNode sibling, FNode newNode) {
final children = _mutableChildrenOf(parent);
if (children == null) return false;
final idx = children.indexWhere((c) => c.id == sibling.id);
if (idx < 0) return false;
children.insert(idx, newNode);
return true;
}