setSelectedNodes<K> static method

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

Implementation

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