collapseAll<K> static method

List<TreeNode<K>> collapseAll<K>(
  1. List<TreeNode<K>> nodes
)

Implementation

static List<TreeNode<K>> collapseAll<K>(List<TreeNode<K>> nodes) {
  return replaceNodes(nodes, (node) {
    return node.expanded ? node.updateState(expanded: false) : null;
  });
}