SyncedTreeNode<TKey, TItem> class

A node of the nested tree that SyncedSliverTree's default constructor consumes.

Instances are immutable: every field is final and children cannot be modified after construction. Signal a change by handing the widget a new tree rather than mutating one in place, which is what its identical-input fast path relies on.

Constructors

SyncedTreeNode({required TKey key, required TItem data, Iterable<SyncedTreeNode<TKey, TItem>> children = const []})
Creates a node. children is copied into an unmodifiable list, so mutating the iterable passed here afterwards has no effect.

Properties

children → List<SyncedTreeNode<TKey, TItem>>
Nested child nodes in sibling order.
final
data → TItem
User payload for this node.
final
hashCode → int
The hash code for this object.
no setterinherited
key → TKey
Unique identifier for this node.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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