FieldElement class

Mounted element for Field: a leaf — no children, no build contract, and the inherited empty rebuild hook. An in-place update swaps the configuration, so field always reports the latest measured value.

Inheritance

Constructors

FieldElement(Field seed)
Creates the element 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
context PerceptionContext
The capability handle for this element, upgraded with the perception capabilities. Lazily wraps the canonical tree handle once; never the element itself.
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
field Field
The current Field configuration, typed.
no setter
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
perception Perception
The current Perception configuration — the domain view of seed.
no setterinherited
perceptionId String
Domain alias of branchId: stable id for this mounted element, assigned at mount and never changing during the element's lifetime.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seed Seed
The current Seed configuration for this branch.
no setterinherited

Methods

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 InheritedBranch when a depended-on value changes. Default: delegates to markNeedsRebuild. StatefulBranch overrides this to also flag didChangeDependencies.
inherited
dependOnInheritedSeedOfExactType<T extends Object>() → 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
markNeedsHarvest() → void
Marks this element dirty so the next PerceptionOwner.flushHarvest re-runs its rebuild hook — delegates to the tree rebuild-marking (Branch.markNeedsRebuild).
inherited
markNeedsRebuild() → void
Funnel override: tree-core invalidation routes through the domain vocabulary, so overriding markNeedsHarvest observes every scheduling path (direct harvest marking and provider invalidation alike).
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