prependChild function

bool prependChild(
  1. FNode parent,
  2. FNode newNode
)

Prepends newNode as the first child of parent.

Implementation

bool prependChild(FNode parent, FNode newNode) {
  final children = _mutableChildrenOf(parent);
  if (children == null) return false;
  children.insert(0, newNode);
  return true;
}