replaceElement method

bool replaceElement(
  1. T? child1,
  2. List<T>? child2
)

Implementation

bool replaceElement(T? child1, List<T>? child2) {
  if (child1 == null || child2 == null) return false;
  var parent = getNodeParent(child1);
  if (parent == null) return false;
  return replaceChildElement(parent, child1, child2);
}