TreeNode<T> class final

One node in the snapshot returned by Query.watchWithTree. Carries the parent CItem<T> and the per-sub-collection branches — each branch keyed by its SubSpec.subName and holding the current list of children at that level (which are themselves TreeNodes, recursing all the way down).

Children are TreeNode<dynamic> because Dart's type system can't thread the per-level generic parameter through a heterogeneous recursive structure without codegen. App code that knows the topology can branches['comments']!.cast<TreeNode<Comment>>().

Constructors

TreeNode({required CItem<T> parent, required Map<String, List<TreeNode>> branches})
const

Properties

branches Map<String, List<TreeNode>>
final
hashCode int
The hash code for this object.
no setterinherited
parent CItem<T>
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