selectNodes<K> static method

List<TreeNode<K>> selectNodes<K>(
  1. List<TreeNode<K>> nodes,
  2. Iterable<TreeNode<K>> selectedNodes
)

Implementation

static List<TreeNode<K>> selectNodes<K>(
    List<TreeNode<K>> nodes, Iterable<TreeNode<K>> selectedNodes) {
  return replaceNodes(nodes, (node) {
    return selectedNodes.contains(node)
        ? node.updateState(selected: true)
        : null;
  });
}