PortSubscription<TValue, TInputData> class abstract

Reactive subscription to a Port's applied value.

Created by AppContainer.observe. Each subscription owns its own Reaction, so tracked atoms are isolated per subscriber — unlike the retired shared-reaction model, two subscribers of the same port that read different atoms no longer erase each other's dep sets.

value holds the most recent apply result and is updated before the supplied onChanged callback fires. Use reapply when the subscription's initialValue / data change but the port itself stays the same — it re-runs apply without the cost of disposing and re-creating the underlying Reaction. Call dispose when the subscription is no longer needed so the reaction drops its atom observers.

Properties

hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Whether dispose has been called (or whether this is a PortSubscription.disabled handle, in which case always true).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → TValue
Latest apply result. Updated automatically whenever a tracked atom changes or reapply is called. After dispose, returns the value at the last successful apply.
no setter

Methods

dispose() → void
Releases the subscription's reaction and its atom observers. Safe to call multiple times.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reapply({required TValue initialValue, required TInputData data}) → void
Updates initialValue / data and re-runs port.apply once.
toString() String
A string representation of this object.
inherited

Operators

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