getSelectedItems<K> static method

List<K> getSelectedItems<K>(
  1. List<TreeNode<K>> nodes
)

Implementation

static List<K> getSelectedItems<K>(List<TreeNode<K>> nodes) {
  return nodes
      .whereType<TreeItem<K>>()
      .where((node) => node.selected)
      .map((node) => node.data)
      .toList();
}