DefaultModelObserver<Model> class

This model observer prints the StoreConnector's ViewModel to the console.

Passe it to the store like this:

var store = Store(modelObserver:DefaultModelObserver());

If you need to print the type of the StoreConnector to the console, make sure to pass debug:this as a StoreConnector constructor parameter. Then, optionally, you can also specify a list of StoreConnectors to be observed:

DefaultModelObserver([MyStoreConnector, SomeOtherStoreConnector]);

You can also override your ViewModels.toString() to print out any extra info you need.

Implemented types

Constructors

DefaultModelObserver([List<Type> _storeConnectorTypes = const <Type>[]])

Properties

current → Model
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
previous → Model
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
observe({Model modelPrevious, Model modelCurrent, bool isDistinct, StoreConnectorInterface storeConnector, int reduceCount, int dispatchCount}) → void
override
toString() String
Returns a string representation of this object.
inherited

Operators

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