filter method

void filter(
  1. bool filterFunction(
    1. TreeNode<T>
    )
)

Filters the tree nodes based on the provided filter function.

The filterFunction should return true for nodes that should be visible.

Implementation

void filter(bool Function(TreeNode<T>) filterFunction) {
  setState(() {
    _applyFilter(_roots, filterFunction);
    _updateAllNodesSelectionState();
    _updateSelectAllState();
  });
}