TreeViewStateHelper<Data> constructor
TreeViewStateHelper<Data> ({
- required AnimatedListStateController<
Data> animatedListStateController, - required TreeViewExpansionBehaviourController<
Data> expansionBehaviourController, - required ITreeNode<
Data> tree, - bool focusToNewNode = true,
Implementation
TreeViewStateHelper({
required this.animatedListStateController,
required this.expansionBehaviourController,
required this.tree,
this.focusToNewNode = true,
}) {
_addedNodesSubscription = tree.addedNodes.listen(handleAddItemsEvent);
_removeNodesSubscription = tree.removedNodes.listen(handleRemoveItemsEvent);
try {
_insertNodesSubscription =
tree.insertedNodes.listen(handleInsertItemsEvent);
} on ActionNotAllowedException catch (_) {}
}