uncheckALl<T extends AbsNodeType> function

bool uncheckALl<T extends AbsNodeType>(
  1. TreeType<T> tree
)

uncheckAll for this tree (from current node to bottom)

Implementation

bool uncheckALl<T extends AbsNodeType>(TreeType<T> tree) {
  tree.data.isChosen = false;

  // need to use index, if not, it could create another instance of [TreeType]
  for (int i = 0; i < tree.children.length; i++) {
    uncheckALl(tree.children[i]);
  }

  return true;
}