allLeaf method

bool allLeaf(
  1. List<Node<E>> nodes
)

returns true if all the nodes in the list are leaves nodes

Implementation

bool allLeaf(List<Node<E>> nodes) {
  return nodes
      .every((element) => getSubNodes(element).isEmpty || element.hideNodes);
}