TreeNode<T> class
A node in a tree structure.
Each TreeNode represents an item in a hierarchical data structure. It contains information about its state (expanded, selected, etc.), its children, and its parent.
The type parameter T
represents the type of the value associated
with this node.
Constructors
-
TreeNode.new({required Widget label, T? value, Icon? icon, Widget trailing(BuildContext context, TreeNode<
T> node)?, dynamic data, bool isSelected = false, List<TreeNode< ? children})T> > -
Creates a TreeNode.
factory
Properties
-
children
→ List<
TreeNode< T> > -
The list of child nodes for this node.
final
- data → dynamic
-
Extra data associated with this node.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Icon?
-
The icon to display next to this node.
final
- label → Widget
-
The label widget displayed for this node.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
trailing
→ Widget Function(BuildContext context, TreeNode<
T> node)? -
The trailing widget displayed for this node.
final
- value → T?
-
An optional value associated with this node.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited