TreeItemView<TKey, TItem> class
Rich view of a visible synced tree node passed to itemBuilder.
- Available extensions
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
- indent → double
-
Horizontal indent for this node in logical pixels.
no setter
- isExpanded → bool
-
Whether this node is currently expanded.
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
- 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
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
-
watch(
{required Widget builder(BuildContext context, TreeItemView< TKey, TItem> node), Key? key}) → Widget -
Available on TreeItemView<
RebuildsTKey, TItem> , provided by the TreeItemViewWatch extensionbuilderwhen this node's expand/collapse state changes.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited