flock library

Classes

CacheItem
EventIterator<E>
Store<E>
An Store records all events happened in app and acts as the single source of truth.
StoreBuilder<E, P>
StoreForEnhancer<E>
Store interface for store enhancers.
StoreState<W extends StoreWidget<E>, E, P>
StoreWidget<E>

Functions

createStore<E>(List<E> prepublish, [ Iterable<StoreEnhancer<E>> enhancers = const [] ]) StoreForEnhancer<E>
Create a Flock Store.
matchEvents<E>(List<E> events, Map<String, EventMatcher<E>> states) → void

Typedefs

EventMatcher<E>(EventIterator<E> events) String
Initializer<P, E>(List<E> events) → P
A Initializer is only called when reducer hasn't called
Reducer<P, E>(P prev, E event) → P
A Reducer calculates view derived from events.
StoreCreator<E>(List<E> prepublish) StoreForEnhancer<E>
Store creator for middleware.
StoreEnhancer<E>(StoreCreator<E> inner) StoreCreator<E>
StoreEnhancer are called "store enhancer" in Redux. They wrap store and enable features like time travel.
Subscriber() → dynamic
Callback when Store is updated.
Unsubscribe() → dynamic
Stop receiving events