genesis_perception library

Measurement domain on the tree spine.

Perception extends Seed, PerceptionElement extends Branch, PerceptionContext is a capability extension of TreeContext, and PerceptionOwner builds on TreeOwner.

The tree spine is re-exported in full: perception's public signatures deliberately surface tree types, so consumers get Seed/Branch/ TreeContext/TreeOwner — and the composition layer, including Watch<T>, which lives in tree's composition layer and perception consumes via this re-export — from this one import.

Classes

Branch
Mounted, persistent node in the tree — the Element analogue.
ComponentBranch
A branch that composes by building a single child Seed — the ComponentElement analogue. Defines the rebuild hook as re-running build, so a config update re-runs the builder.
DiagnosticsDoubleProperty
DiagnosticsDurationProperty
DiagnosticsEnumProperty
DiagnosticsFlagProperty
DiagnosticsIntProperty
DiagnosticsObjectProperty
DiagnosticsProperty
One typed, severity-bearing property on a diagnostics tree node.
DiagnosticsReferenceProperty
DiagnosticsStringProperty
DiagnosticsTimestampProperty
Field
Named value leaf: Field(name, value) — the measurement vocabulary for a single named datum.
FieldElement
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.
InheritedBranch<T extends Object>
Mounted branch for InheritedSeed. Owns the dependent set, reconciles the single child via the rebuild hook, and invalidates dependents through Branch.dependencyChanged when the value changes.
InheritedPerception<T extends Object>
Provides an ambient value of type T to all descendants in the perception tree — the perception-domain face of the tree composition layer's InheritedSeed.
InheritedPerceptionElement<T extends Object>
Mounted element for InheritedPerception: tree's InheritedBranch — dependent set, single-child reconciliation through the rebuild hook, and notify-before-reconcile update ordering are all inherited.
InheritedSeed<T extends Object>
Provides an ambient value of type T to all descendants in the tree — the InheritedWidget analogue.
Key
A first-class identity token for a Seed, used by keyed reconciliation to pair a new configuration with an existing mounted Branch across rebuilds.
MultiChildBranch
Mounted branch for a MultiChildSeed: keyed-reconciles the seed's declared MultiChildSeed.children — the MultiChildRenderObjectElement analogue.
MultiChildSeed
A Seed that carries a fixed, ordered list of child seeds directly in its configuration — the MultiChildRenderObjectWidget analogue, and the multi-child sibling of the single-child component seeds (StatelessSeed/StatefulSeed/Sprout).
Nest
A Seed that stacks a list of SingleChildSeeds into a vertical chain, each wrapping the next down to a single leaf child — the generic Nested/MultiProvider shape, and the vertical sibling of MultiChildSeed's horizontal fan-out.
NestBranch
Mounted branch for a Nest: folds the declared chain into a spine of hook branches and keeps it reconciled.
Node
Named container perception: a keyed-multichild structural node in a measurement (the measurement vocabulary, built on the tree spine).
NodeElement
Mounted element for Node: a NON-component element whose artifact response in the rebuild hook is keyed reconciliation of its children — no build contract.
ObjectKey
A Key backed by the identity of value; equal only when both keys wrap the identical (identical) object.
Perception
Immutable measurement configuration node — the domain's config base.
PerceptionContext
Capability extension of TreeContext for the perception domain.
PerceptionElement
Mounted, live node in the perception tree — PerceptionElement extends Branch.
PerceptionOwner
Owns the root element, holds the dirty set, and drives synchronous depth-ordered harvest flushes — PerceptionOwner builds on TreeOwner by extension.
PerceptionState<T extends StatefulPerception>
Mutable state owned by a StatefulPerceptionElement — the perception face of the tree composition layer's State, with the domain vocabulary layered on:
Seed
Immutable configuration node — the Widget analogue: planted, describes what grows.
SingleChildSeed
Marker interface for a Seed that can slot into a Nest as a link — the single-child analogue of package:nested's SingleChildWidget.
SingleChildState<T extends SingleChildStatefulSeed>
Mutable state for a SingleChildStatefulSeed — a State that describes its subtree through buildWithChild, with the full initState/didChangeDependencies/setState/dispose lifecycle inherited.
SingleChildStatefulBranch
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.
SingleChildStatefulSeed
A SingleChildSeed whose branch owns mutable SingleChildState — the single-child StatefulSeed, built directly on StatefulSeed.
SingleChildStatelessBranch
Mounted branch for a SingleChildStatelessSeed: a StatelessBranch that, inside a Nest, builds with the injected downstream instead of the seed's own child.
SingleChildStatelessSeed
A SingleChildSeed that composes purely from its own configuration — the single-child StatelessSeed, built directly on StatelessSeed.
Sprout
A Seed whose branch holds its state in hooks declared inline in build — the hooks-style alternative to StatefulSeed + State<T>.
SproutBranch
Mounted branch for a Sprout: a ComponentBranch that owns the persistent hook slots and dispatches hooks by call order.
SproutContext
The build-time hook-dispatch handle passed to Sprout.build.
State<T extends StatefulSeed>
Mutable state owned by a StatefulBranch, with the initState/didChangeDependencies/build/dispose lifecycle.
StateCell<T>
A mutable state cell returned by SproutContext.useState. Setting value marks the owning branch for rebuild (the setState analogue).
StatefulBranch
Mounted branch for a StatefulSeed: creates and owns the State, drives its lifecycle, and delegates build to it.
StatefulPerception
A configuration whose element owns mutable PerceptionState — the perception-domain face of the tree composition layer's StatefulSeed.
StatefulPerceptionElement
Mounted element for StatefulPerception: tree's StatefulBranch with the capability handle upgraded to PerceptionContext and the state surfaced as PerceptionState.
StatefulSeed
A Seed whose branch owns mutable State — the StatefulWidget analogue.
StatelessBranch
Mounted branch for a StatelessSeed: delegates build to the seed.
StatelessPerception
A configuration that composes purely from itself — the perception-domain face of the tree composition layer's StatelessSeed.
StatelessPerceptionElement
Mounted element for StatelessPerception: tree's StatelessBranch with the capability handle upgraded to PerceptionContext, so build() receives the domain handle.
StatelessSeed
A Seed that composes purely from its own configuration — the StatelessWidget analogue.
TreeContext
Build-time capability handle into the tree — the BuildContext analogue minus the Element≡BuildContext "original sin".
TreeNode
One semantic node in a TreeSnapshot.
TreeOwner
Owns the root branch, holds the dirty set, and drives synchronous depth-ordered flushes — the BuildOwner.buildScope analogue.
TreeSnapshot
A complete versioned projection of the live diagnostics tree.
ValueKey<T>
A Key backed by a value of type T; equal when both the runtime type and the value are equal.
Watch<T>
Subscribes to source and rebuilds with each event — the Attention primitive: pure composition + dart:async with zero domain semantics.
WatchState<T>
State for Watch: holds the latest value and the stream subscription; each event flows through the setState analogue into a rebuild.

Enums

DiagnosticsLevel
Display severity attached to every diagnostics property.
ReferenceKind
Link target classifier for a DiagnosticsProperty.reference.

Mixins

Diagnosticable
An object that describes its diagnostic properties.
DiagnosticableTree
A Diagnosticable that also describes an ordered child tree.
SingleChildBranchMixin
The branch-side capability that lets a SingleChildSeed's branch receive a downstream injected by an enclosing Nest — the analogue of nested's SingleChildWidgetElementMixin.

Constants

copyWithAbsent → const Object

Functions

checkedEnum<T extends Enum>(List<T> values, String wireValue, String key) → T
checkedJsonDateTime(Map<String, Object?> json, String key) DateTime
checkedJsonList(Map<String, Object?> json, String key) List<Object?>
checkedJsonMap(Map<String, Object?> json, String key) Map<String, Object?>
checkedJsonMapValue(Object? value, String key) Map<String, Object?>
checkedJsonNullableValue<T>(Map<String, Object?> json, String key) → T?
checkedJsonValue<T>(Map<String, Object?> json, String key) → T
listEquals<T>(List<T> left, List<T> right) bool
projectPerceptionTree(Branch root, {DateTime? projectedAt}) TreeSnapshot
Projects the perception subtree rooted at root to diagnostics contract 1.
serializePerceptionFragment(Branch root) Map<String, Object?>
Serializes the perception subtree rooted at root into a JSON-able map.

Typedefs

Dispose = void Function()
A cleanup callback returned by a SproutContext.useEffect effect, run before the effect re-runs and on unmount.
VoidCallback = void Function()
Signature for argument-free callbacks.

Exceptions / Errors

CheckedFromJsonException
A loud failure while decoding the diagnostics wire contract.