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