StatefulPerceptionElement class
Mounted element for StatefulPerception: tree's StatefulBranch with the capability handle upgraded to PerceptionContext and the state surfaced as PerceptionState.
- Inheritance
-
- Object
- Branch
- ComponentBranch
- StatefulBranch
- StatefulPerceptionElement
Constructors
- StatefulPerceptionElement(StatefulPerception seed)
-
Creates the element and its PerceptionState 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 → PerceptionContext
-
The capability handle for this branch.
no setteroverride
-
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
- 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
→ PerceptionState<
StatefulPerception> -
The state, typed as PerceptionState.
@protected(mirrors StatefulBranch.state): subclass/test access only, never external.no setteroverride
Methods
-
build(
TreeContext context) → Seed -
Builds the child configuration.
contextis this branch's capability handle — never the branch itself.inherited -
debugDescribeChildren(
) → List< Diagnosticable> -
Returns this object's diagnostic children in display order.
inherited
-
debugFillProperties(
List< DiagnosticsProperty> properties) → void -
Adds this object's diagnostic properties to
properties.inherited -
dependencyChanged(
) → void -
Called by
InheritedBranchwhen a depended-on value changes. Default: delegates to markNeedsRebuild.StatefulBranchoverrides this to also flag didChangeDependencies.inherited -
dependOnInheritedSeedOfExactType<
T extends Object> () → T? -
Returns the nearest ancestor value provided via
InheritedSeed<T>of exact typeT, 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 typeTwithout 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
parentatslot.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performRebuild(
) → void -
The single rebuild hook.
Branchcore attaches no meaning to it; the composition layer defines it as re-runningbuild(), 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
forceis 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
childagainstnewSeedatslot.inherited -
updateChildren(
List< Branch> oldChildren, List<Seed> newSeeds) → List<Branch> -
Reconciles
oldChildrenagainstnewSeedsby key identity.inherited -
visitChildren(
void visitor(Branch dep)) → void -
Calls
visitoronce for each direct child of this branch, in tree order.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited