TreeViewNode<T> class

A node in the compatibility TreeView constructor.

Use TreeView.model with bubbles.TreeItem when expansion, selection, and viewport state must be shared with another host. This class remains useful for concise, display-oriented trees and preserves the original TreeView API.

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

Constructors

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

Properties

children → List<TreeViewNode<T>>
Child nodes.
final
expanded → bool
Whether this node's children are initially shown.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → String?
Optional icon/prefix for this node (for example, "📁" or "📄").
final
id → String?
Optional stable identity.
final
label → String
The text label for this node.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectable → bool
Whether this node may receive selection.
final
style → Style?
Optional style override for this node's label.
final
value → T?
Optional consumer value used by selection and activation callbacks.
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