RefenaHistoryObserver class Testing

An observer that stores every event in a list. This is useful for testing to keep track of the events.

Inheritance

Constructors

RefenaHistoryObserver([HistoryObserverConfig config = HistoryObserverConfig.defaultConfig])
RefenaHistoryObserver.all()
factory
RefenaHistoryObserver.only({bool startImmediately = true, bool providerInit = false, bool providerDispose = false, bool listenerAdded = false, bool listenerRemoved = false, bool change = false, bool rebuild = false, bool actionDispatched = false, bool actionFinished = false, bool actionError = false, bool message = false})
factory

Properties

config HistoryObserverConfig
The configuration of the observer.
final
debugLabel String
Override this getter to provide a custom label.
no setterinherited
dispatchedActions List<BaseReduxAction<ReduxNotifier, dynamic, dynamic>>
Dispatched actions. Make sure that HistoryObserverConfig.saveActionDispatchedEvents is true.
no setter
hashCode int
The hash code for this object.
no setterinherited
history List<RefenaEvent>
The history of events.
final
initialized bool
Whether the observer has been initialized. The observer won't receive any events until it is initialized.
no setterinherited
listening bool
Whether the observer is currently listening to events.
getter/setter pair
messages List<String>
Messages Make sure that HistoryObserverConfig.saveMessageEvents is true.
no setter
ref Ref
Use the ref to access the state.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clears the history.
dispose() → void
Override this method to have additional dispose logic. Observers only get disposed when the RefenaContainer is disposed.
inherited
handleEvent(RefenaEvent event) → void
Called when an event occurs. Override this method to handle the event.
override
init() → void
Override this method to have additional initialization logic. You can use ref at this point.
inherited
internalSetup(ProxyRef ref) → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printHistory() → void
Prints the history to the console. Uses implementation of RefenaDebugObserver.
start({bool clearHistory = false}) → void
Starts the observer to store events.
stop() → void
Stops the observer from storing events.
toString() String
A string representation of this object.
inherited

Operators

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