TreeController class

Manages the expand/collapse state of a TreeView.

Each node is identified by an Object key. Use toggleExpansion to expand or collapse, and isExpanded to query state.

Inheritance

Constructors

TreeController({Set<Object>? initialExpandedKeys})
Creates a TreeController with optional initialExpandedKeys.

Properties

expandedKeys Set<Object>
The set of currently expanded node keys.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(dynamic listener()) → void
Register a closure to be called when the object changes.
inherited
collapse(Object key) → void
Collapses the node identified by key.
collapseAll() → void
Collapses all nodes.
dispose() → void
Discards any resources used by the object.
override
expand(Object key) → void
Expands the node identified by key.
expandAll(List<Object> allKeys) → void
Expands all nodes whose keys are in allKeys.
isExpanded(Object key) bool
Returns true if the node identified by key is expanded.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(dynamic listener()) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toggleExpansion(Object key) → void
Toggles the expansion state of the node identified by key.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited