Store class

A comfortable way to develop reactive widgets. You can dynamically add or remove effects and states and many more.

Constructors

Store(List<BaseState> states)

Properties

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

Methods

addEffect(EffectCallback callback, {String effectKey}) → void
This method is usefull to add a single effect passing a callback ( Actions action$, Store store$)=>Stream and effectKey on demand. [...]
addEffects(BaseEffect effectInstance) → void
This method is usefull to add effects passing effectInstance on demand.
addState(BaseState stateInstance) → void
This method is usefull to add a state passing stateInstance on demand.
dispatch(Action action) → void
dispose() → void
It's a clean up function.
exportState() Stream<List>
return latest stream of action, state array. [...]
importState(Map<String, dynamic> state) → void
state object should be a Map<String, dynamic> state [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeEffectsByKey(String effectKey) → void
This method is usefull to remove effects passing effectKey on demand.
removeStateByStateName(String stateName, [bool shouldDispatch = true]) → void
This method is usefull to remove a state passing stateName on demand.
select<T>(String stateName) Stream<T>
This method takes a single param String stateName and return Stream/Stream [...]
select2<T>(T callback(Map<String, dynamic> state)) Stream<T>
This method takes a callback which has a single Map<String, dynamic> type arg. If you pass Map key as a state name then you will get corresponding model instance as value. [...]
toString() String
Returns a string representation of this object.
inherited

Operators

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