StateManagerDiffObserver class
A StateManagerObserver that forwards each mutation to a list of YxRouteObservers along with the computed diff between the original and target trees.
All other lifecycle callbacks are delegated to sourceObserver unchanged.
- Inheritance
-
- Object
- StateManagerObserver
- StateManagerDiffObserver
- Annotations
-
- @experimental
Constructors
-
StateManagerDiffObserver({required StateManagerObserver? sourceObserver, required List<
YxRouteObserver> routeObservers}) -
A StateManagerObserver that forwards each mutation to a list of
YxRouteObservers along with the computed diff between the original and
target trees.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
routeObservers
→ List<
YxRouteObserver> -
Observers that are notified with the tree diff after each mutation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceObserver → StateManagerObserver?
-
Optional base observer that receives every state manager event.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClose(
BaseStateManager stateManager) → void -
Called when
stateManageris closed.override -
onCreate(
BaseStateManager stateManager) → void -
Called when a BaseStateManager is constructed.
override
-
onError(
BaseStateManager stateManager, Object error, StackTrace stackTrace) → void -
Called when an
errorwithstackTraceis thrown insidestateManager.override -
onMutation(
BaseStateManager stateManager, Mutation mutation) → void -
Called when a Mutation is applied to
stateManager.override -
onRouteDiffMutation(
Mutation mutation) → void -
Computes the diff for
mutationand dispatches it to every registered YxRouteObserver. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited