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