toggleSelectItems<K> static method
Implementation
static List<TreeNode<K>> toggleSelectItems<K>(
List<TreeNode<K>> nodes, Iterable<K> targets) {
return replaceNodes(nodes, (node) {
if (node is TreeItem<K> && targets.contains(node.data)) {
return node.updateState(selected: !node.selected);
}
return null;
});
}