TreeWidget<T> class

A tree widget that displays nested TreeNode hierarchies.

Inheritance

Constructors

TreeWidget({Key? key, required TreeNode<T> root, void onSelect(TreeNode<T>)?, Style selectedStyle = const Style(foreground: CharmColors.pepper, background: CharmColors.charple, modifiers: Modifier.bold), Style unselectedStyle = const Style(foreground: CharmColors.soda), Style lineStyle = const Style(foreground: CharmColors.bbq), bool showRoot = true, bool focused = true})
Creates a TreeWidget with the specified root node.
const

Properties

focused → bool
Whether the tree currently has keyboard focus.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
The optional key for this widget.
finalinherited
lineStyle → Style
The style applied to the horizontal and vertical guide lines.
final
onSelect → void Function(TreeNode<T>)?
Callback executed when a node is selected.
final
root → TreeNode<T>
The root node of the tree.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedStyle → Style
The style applied to the selected active node.
final
showRoot → bool
Whether to show the root node in the tree.
final
unselectedStyle → Style
The style applied to unselected nodes.
final

Methods

createElement() → Element
Creates an Element to manage this widget's location in the tree.
inherited
createState() → State<TreeWidget<T>>
Creates the mutable state for this widget at a given location in the tree.
override
getIntrinsicHeight(int width) → int
Computes the intrinsic height of this widget under the given width constraint.
inherited
getIntrinsicWidth(int height) → int
Computes the intrinsic width of this widget under the given height constraint.
inherited
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