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 StoreConnector
s to be
observed:
DefaultModelObserver([MyStoreConnector, SomeOtherStoreConnector]);
You can also override your ViewModels.toString()
to print out
any extra info you need.
- Implemented types
-
- ModelObserver<
Model>
- ModelObserver<
Constructors
-
DefaultModelObserver([List<
Type> _storeConnectorTypes = const <Type>[]])
Properties
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