TreeController<T> constructor
TreeController<T> ({
- required List<
TreeNode< roots,T> > - Set<
TreeNodeId> ? expanded, - Set<
TreeNodeId> ? checked, - TreeNodeId? selected,
- Set<
TreeNodeId> ? selection, - TreeSelectionMode selectionMode = TreeSelectionMode.single,
- int historyLimit = 200,
Implementation
TreeController({
required List<TreeNode<T>> roots,
Set<TreeNodeId>? expanded,
Set<TreeNodeId>? checked,
TreeNodeId? selected,
Set<TreeNodeId>? selection,
this.selectionMode = TreeSelectionMode.single,
this.historyLimit = 200,
}) : _roots = List.unmodifiable(roots),
_expanded = {...?expanded},
_checked = {...?checked},
_selection = {...?selection, if (selected != null) selected},
_selected = selected {
_focused = selected;
_anchor = selected;
}