TreeItemView<TKey, TItem> class

Rich view of a visible synced tree node passed to itemBuilder.

Constructors

TreeItemView({required TKey key, required TItem item, required int depth, required TKey? parentKey, required TreeController<TKey, TItem> controller})
const

Properties

childCount → int
Number of direct children currently attached to this node.
no setter
controller → TreeController<TKey, TItem>
The backing tree controller.
final
depth → int
Nesting depth (0 for roots).
final
hasChildren → bool
Whether this node currently has children.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasLiveChildren → bool
Whether this node has children that are not animating out.
no setter
indent → double
Horizontal indent for this node in logical pixels.
no setter
indexInParent → int
Position among this node's siblings, 0-based, in live space: siblings that are animating out are skipped.
no setter
isExpanded → bool
Whether this node is currently expanded.
no setter
isFirst → bool
Whether this node is the first of its live siblings.
no setter
isLast → bool
Whether this node is the last of its live siblings. See isFirst.
no setter
isRoot → bool
Whether this node is a root.
no setter
item → TItem
User payload for this node.
final
key → TKey
Unique identifier for this node.
final
liveChildCount → int
Number of direct children excluding those animating out.
no setter
parentKey → TKey?
Parent node key, or null when this node is a root.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
siblingCount → int
How many siblings this node sits among, itself included, excluding siblings that are animating out.
no setter

Methods

collapse({bool animate = true}) → void
Collapses this node.
expand({bool animate = true}) → void
Expands this node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toggle({bool animate = true}) → void
Toggles this node between expanded and collapsed.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited