deselectItems<K> static method

List<TreeNode<K>> deselectItems<K>(
  1. List<TreeNode<K>> nodes,
  2. Iterable<K> deselectedItems
)

Implementation

static List<TreeNode<K>> deselectItems<K>(
    List<TreeNode<K>> nodes, Iterable<K> deselectedItems) {
  return replaceNodes(nodes, (node) {
    if (node is TreeItem<K> && deselectedItems.contains(node.data)) {
      return node.updateState(selected: false);
    }
    return null;
  });
}