removeLeaf method

DeepNavigationNode<T>? removeLeaf()

removes the leaf of this child.

Implementation

DeepNavigationNode<T>? removeLeaf() {
  if (child == null) {
    return null;
  }

  return setChild(child!.removeLeaf());
}