ReactiveNotifier class
Manages subscriptions and triggers rebuilds for all reactive widgets.
This class is the core engine behind the Reactivity
system.
It maps keys (used by Reactive
, ReactiveStatus
, ValueState
, etc.)
to their corresponding State.setState callbacks and invokes them
when needed.
It provides four types of rebuild operations:
- updateOnly → one specific key
- update → all general reactive widgets
- updateStatus → all listeners of a given status type
- updateState → specific
InitedState
,ValueState
, etc.
Constructors
- ReactiveNotifier.new()
- Creates a new reactive notifier.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addUpdate(
Key key, UniqueKey uniqueKey, State< StatefulWidget> state) → void -
Registers a widget’s subscription to reactive updates for a given
key
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rebuild(
void setState(VoidCallback )) → void -
Schedules a rebuild of a widget using
setState
in the next frame. -
removeUpdate(
Key key, UniqueKey uniqueKey) → void -
Removes a widget’s subscription for a specific
key
anduniqueKey
. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
) → void - Rebuilds all widgets that were subscribed to the general Reactive key.
-
updateOnly(
Key key) → void -
Rebuilds only widgets that are subscribed to a specific
key
. -
updateState(
UniqueKey uniqueKey) → void -
Rebuilds widgets tied to a specific state key, typically from
InitedState
,ValueState
, orVoidState
. -
updateStatus(
dynamic status) → void - Rebuilds all widgets listening to a specific runtime type status.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited