SagaMonitor class

Used by the middleware to dispatch monitoring events. Actually the middleware dispatches 6 events:

Note : All events are attached to an empty function by default.

Example

// create a monitor instance
var monitor = SagaMonitor();

// attach monitor events
// monitor.rootSagaStarted = ...

// pass the monitoring object to the middleware
var sagaMiddleware = createMiddleware(options: Options(sagaMonitor: monitor));

var store = createStore(sagaMiddleware);

sagaMiddleware.setStore(store);

Constructors

SagaMonitor()

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

actionDispatched(dynamic action) → void
Defines function type which is invoked when a Redux action is dispatched
effectCancelled(int effectId) → void
Defines function type which is invoked when an effect is cancelled by the middleware
effectRejected(int effectId, dynamic error) → void
Defines function type which is invoked when an effect is rejected by the middleware
effectResolved(int effectId, dynamic result) → void
Defines function type which is invoked when an effect is successfully resolved by the middleware
effectTriggered(int effectId, int parentEffectId, dynamic label, dynamic effect) → void
Defines function type which is invoked when an effect triggered by the middleware
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rootSagaStarted(int effectId, Function saga, List? args, Map<Symbol, dynamic>? namedArgs, String? name) → void
Defines function type which is invoked when a root saga is starts
toString() String
A string representation of this object.
inherited

Operators

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