selectedItems method
Returns an iteration of all selected items (optionally including items that are only partially selected).
Implementation
Iterable<TreeViewItem> selectedItems(bool includePartiallySelectedItems) {
return whereForAll((item) =>
(item.selected ?? false) ||
(includePartiallySelectedItems && item.selected == null));
}