TreeViewNode class

A node in a TreeView widget.

Each node has a label and optional children. Nodes can be styled individually via style, or use the tree's default styling.

Named TreeViewNode to avoid collision with the bubbles TreeNode interface from package:artisanal.

Constructors

TreeViewNode({required String label, List<TreeViewNode> children = const [], Style? style, String? icon, bool expanded = true})
const
TreeViewNode.fromMap(Map<String, dynamic> map)
Creates a TreeViewNode from a map structure.
factory

Properties

children List<TreeViewNode>
Child nodes.
final
expanded bool
Whether this node's children are shown. Only meaningful if children is non-empty.
final
hashCode int
The hash code for this object.
no setterinherited
icon String?
Optional icon/prefix for this node (e.g., "📁", "📄").
final
label String
The text label for this node.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style Style?
Optional style override for this node's label.
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