TreeController<T> constructor

TreeController<T>({
  1. required List<TreeNode<T>> roots,
  2. Set<TreeNodeId>? expanded,
  3. Set<TreeNodeId>? checked,
  4. TreeNodeId? selected,
  5. Set<TreeNodeId>? selection,
  6. TreeSelectionMode selectionMode = TreeSelectionMode.single,
  7. 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;
}