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?
no setter
hashCode int
The hash code for this object.
no setterinherited
previous → Model?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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