SingleChildStatefulBranch class

Mounted branch for a SingleChildStatefulSeed: a StatefulBranch — full State lifecycle inherited — that, inside a Nest, builds with the injected downstream instead of the seed's own child.

Inheritance
Mixed-in types

Constructors

SingleChildStatefulBranch(SingleChildStatefulSeed seed)
Creates the branch and its SingleChildState for seed.

Properties

branchId ↔ String
Stable id for this mounted branch; assigned at mount time via TreeOwner.issueId and never changes during the branch's lifetime.
latefinalinherited
child → Branch?
The mounted child branch built by build. Exposed for testing. Do not use in production code.
no setterinherited
context → TreeContext
The capability handle for this branch.
no setterinherited
dependencies → Set<Branch>
Providers this branch depends on. Exposed for testing. Do not use in production code.
no setterinherited
depth ↔ int
Depth from the root (root = 0). Drives the owner's depth-ordered flush.
getter/setter pairinherited
dirty → bool
Whether this branch is currently marked as needing rebuild.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
injectedChild → Seed?
The downstream supplied by the enclosing Nest link, or null when this branch is used standalone (outside a chain).
no setterinherited
key → Key?
The Key of the underlying Seed config, or null if unkeyed.
no setterinherited
mounted → bool
Whether this branch is currently mounted in a tree.
no setterinherited
owner ↔ TreeOwner?
The TreeOwner this branch is mounted under. Set by TreeOwner.mountRoot for roots and inherited from the parent in mount.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seed → Seed
The current Seed configuration for this branch.
no setterinherited
state → State<StatefulSeed>
The mutable state owned by this branch.
no setterinherited

Methods

build(TreeContext context) → Seed
Builds the child configuration. context is this branch's capability handle — never the branch itself.
override
debugDescribeChildren() → List<Diagnosticable>
Returns this object's diagnostic children in display order.
inherited
debugFillProperties(DiagnosticsBuilder properties) → void
Adds this object's diagnostic properties to properties.
inherited
dependencyChanged() → void
Called by InheritedBranch when a depended-on value changes. Default: delegates to markNeedsRebuild. StatefulBranch overrides this to also flag didChangeDependencies.
inherited
dependOnInheritedSeedOfExactType<T extends Object>({Object? aspect}) → T?
Returns the nearest ancestor value provided via InheritedSeed<T> of exact type T, registering this branch as a dependent; null when no such ancestor exists.
inherited
getInheritedSeedOfExactType<T extends Object>() → T?
Returns the nearest ancestor value provided via InheritedSeed<T> of exact type T without registering a dependency; null when no such ancestor exists.
inherited
markNeedsRebuild() → void
Marks this branch dirty so the next TreeOwner.flush rebuilds it.
inherited
mount(Branch? parent, Object? slot) → void
Attaches this branch into the tree under parent at slot.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performRebuild() → void
The single rebuild hook. Branch core attaches no meaning to it; the composition layer defines it as re-running build(), and non-component branches define their own rebuild behavior.
inherited
rebuild({bool force = false}) → void
Runs performRebuild when this branch is mounted and dirty (or when force is true — the update path). Clears the dirty flag first, so a branch force-rebuilt during reconciliation is skipped when the owner later drains it in the same flush.
inherited
removeDependency(Branch dep) → void
Package-internal: called only by InheritedBranch.removeDependent.
inherited
toString() → String
A string representation of this object.
inherited
toStringDeep() → String
Returns a deterministic multiline description of this object.
inherited
unmount() → void
Detaches this branch from the tree.
inherited
update(Seed newSeed) → void
Updates the config node when Seed.canUpdate is true, then invokes the rebuild path: a config update reaches performRebuild with the new seed already in place. What the hook does is layered — components re-run build(); non-component branches respond with their own rebuild semantics.
inherited
updateChild(Branch? child, Seed? newSeed, Object? slot) → Branch?
Reconciles child against newSeed at slot.
inherited
updateChildren(List<Branch> oldChildren, List<Seed> newSeeds) → List<Branch>
Reconciles oldChildren against newSeeds by key identity.
inherited
visitChildren(void visitor(Branch dep)) → void
Calls visitor once for each direct child of this branch, in tree order.
inherited

Operators

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