core library
Re-exports the core Jolt reactive system for Flutter integration.
This file provides access to the fundamental Jolt reactive primitives including effects, batching, and the reactive system core. These are the building blocks that power the Flutter-specific widgets and signals.
Classes
-
AsyncSignalImpl<
T> - Implementation of AsyncSignal that manages async state transitions.
-
ComputedImpl<
T> - Implementation of Computed that automatically updates when its dependencies change.
-
ComputedReactiveNode<
T> - Base reactive node for computed values.
-
ConvertComputedImpl<
T, U> - Implementation of ConvertComputed that converts between different types.
-
CustomReactiveNode<
T> - Base class for custom reactive nodes with custom update logic.
- EffectBaseReactiveNode
- Shared contract for effect-like nodes that can be disposed.
- EffectImpl
- Implementation of Effect that automatically runs when its dependencies change.
- EffectReactiveNode
- Reactive node that runs a side-effect callback when triggered.
- EffectScopeImpl
- Implementation of EffectScope for managing the lifecycle of effects and other reactive nodes.
- EffectScopeReactiveNode
- Reactive node that groups multiple effects for scoped disposal.
-
IterableSignalImpl<
E> - Implementation of IterableSignal that computes its value from a getter function.
- JFinalizer
- A finalizer utility for managing disposers attached to Jolt objects.
- JoltDebug
- Link
- Link between reactive nodes in the dependency graph.
-
ListSignalImpl<
E> - Implementation of ListSignal that automatically notifies subscribers when modified.
-
MapSignalImpl<
K, V> - Implementation of MapSignal that automatically notifies subscribers when modified.
-
PersistSignalImpl<
T> - Implementation of PersistSignal that persists its value to external storage.
- ReactiveFlags
- Flags for tracking reactive node state.
- ReactiveNode
- Base class for all reactive nodes in the dependency graph.
-
Readonly<
T> - Interface for readonly reactive values.
-
SetSignalImpl<
E> - Implementation of SetSignal that automatically notifies subscribers when modified.
-
SignalImpl<
T> - Implementation of Signal that holds a value and notifies subscribers when it changes.
-
SignalReactiveNode<
T> - Base reactive node for writable signals.
-
Stack<
T> - Stack data structure for managing recursive operations.
-
WatcherImpl<
T> - Implementation of Watcher that observes changes to reactive sources and executes a callback.
-
Writable<
T> - Interface for writable reactive values.
-
WritableComputedImpl<
T> - Implementation of WritableComputed that can be both read and written.
Enums
- DebugNodeOperationType
- Types of operations that can be debugged in the reactive system.
Mixins
-
ReadonlyNodeMixin<
T> - Mixin that provides base functionality for readonly reactive nodes.
Properties
- activeScope ↔ EffectScopeReactiveNode?
-
Effect scope that is currently being configured.
getter/setter pair
- activeSub ↔ ReactiveNode?
-
Effect or computed that is currently collecting dependencies.
getter/setter pair
- batchDepth ↔ int
-
Current nesting depth of
`startBatch`/`endBatch`calls.getter/setter pair - cycle ↔ int
-
Monotonically increasing counter used to stamp dependency links during
recomputation cycles.
getter/setter pair
- notifyIndex ↔ int
-
Index of the next effect to flush from queued.
getter/setter pair
-
queued
→ List<
EffectReactiveNode?> -
Ring buffer that stores pending EffectReactiveNode instances.
final
- queuedLength ↔ int
-
Number of scheduled effects stored inside queued.
getter/setter pair
Functions
-
checkDirty(
Link theLink, ReactiveNode sub) → bool - Checks if a node is dirty and needs updating.
-
defaultRunEffect(
EffectReactiveNode e, void fn()) → void - Executes an EffectReactiveNode when it is dirty or pending.
-
disposeNode(
ReactiveNode e) → void - Disposes any reactive node and detaches all dependencies/subscribers.
-
endBatch(
) → void - Ends the current batch and flushes pending effects when depth reaches zero.
-
flushEffects(
) → void - Flushes all queued effects and executes them.
-
getActiveScope(
) → EffectScopeReactiveNode? - Returns the EffectScopeReactiveNode that is currently open.
-
getActiveSub(
) → ReactiveNode? - Returns the effect or computed currently being tracked.
-
getBatchDepth(
) → int - Returns the current batch depth, where zero means no batching.
-
getComputed<
T> (ComputedReactiveNode< T> computed) → T - Returns the current value of a computed node, recomputing it when dirty and linking it to the active subscriber.
-
getSignal<
T> (SignalReactiveNode< T> signal) → T - Returns the current cached value of a signal and links it to the active subscriber.
-
isValidLink(
Link checkLink, ReactiveNode sub) → bool - Checks if a link is still valid for a subscriber.
-
link(
ReactiveNode dep, ReactiveNode sub, int version) → void - Abstract reactive system for managing dependency tracking.
-
notifyComputed<
T> (ComputedReactiveNode< T> computed) → void - Invalidates a computed node and notifies its subscribers without assigning a new value.
-
notifyCustom<
T> (ReactiveNode node) → void - Invalidates a custom reactive node so that subscribers re-evaluate without changing the stored value.
-
notifyEffect(
ReactiveNode e) → void - Enqueues an EffectReactiveNode chain for execution.
-
notifySignal<
T> (SignalReactiveNode signal) → void - Invalidates a signal so that subscribers re-evaluate without changing the stored value.
-
propagate(
Link theLink) → void - Propagates changes through the reactive graph.
-
purgeDeps(
ReactiveNode sub) → void - Removes all dependency links from a subscriber so future tracking starts from a clean slate.
-
setActiveScope(
[EffectScopeReactiveNode? scope]) → EffectScopeReactiveNode? - Sets the ambient EffectScopeReactiveNode and returns the previous scope.
-
setActiveSub(
[ReactiveNode? sub]) → ReactiveNode? - Sets the currently active effect or computed and returns the previous one.
-
setSignal<
T> (SignalReactiveNode< T> signal, T newValue) → T - Assigns a new pending value to a signal and schedules subscribers.
-
shallowPropagate(
Link theLink) → void - Shallow propagates changes without deep recursion.
-
startBatch(
) → void - Begins a batch so multiple writes can be coalesced before effects run.
-
trigger<
T> (T fn()) → T -
Executes
fninside a temporary subscriber and propagates any triggered signals once the callback finishes. -
unlink(
Link link, [ReactiveNode? sub]) → Link? - Unlinks a dependency from a subscriber.
-
unwatched(
ReactiveNode node) → void - Cleans up dependency links when a node no longer has subscribers.
-
updateComputed<
T> (ComputedReactiveNode< T> computed) → bool - Recomputes a ComputedReactiveNode and reports whether the pending value changed.
-
updateCustom<
T> (ReactiveNode node) → bool - Updates a custom reactive node and returns whether its value changed.
-
updateNode(
ReactiveNode node) → bool - Updates either a ComputedReactiveNode or SignalReactiveNode and returns whether its cached value changed.
-
updateSignal<
T> (SignalReactiveNode< T> signal) → bool - Updates a SignalReactiveNode's cached value from its pending value.
Typedefs
- JoltDebugFn = void Function(DebugNodeOperationType type, ReactiveNode node)
- Function type for debugging reactive system operations.