flutter_rx_core library

Classes

On<State, Action extends StoreAction>
A special type of reducer object that will only run for a specific StoreAction.
Store<S extends StoreState>
Creates a store that holds the app's state.
StoreAction
A base class for all Actions to extend. This allows for type safety when dispatching actions or handling actions in reducers or effects.
StoreState
The immutable state managed by the store.

Functions

createReducer<State>(Iterable<On<State, StoreAction>> ons) Reducer<State>
A utility function that combines several On reducer objects.
createSelector<S, T>(T mapFn(S, dynamic)) Selector<S, T>
Create a selector from the App's State.
createSelector1<S, R1, T>(Selector<S, R1> selector, T mapFn(R1, dynamic)) Selector<S, T>
Create a selector composed from one other selector.
createSelector2<S, R1, R2, T>(Selector<S, R1> selector1, Selector<S, R2> selector2, T mapFn(R1, R2, dynamic)) Selector<S, T>
Create a selector composed from two other selectors.
createSelector3<S, R1, R2, R3, T>(Selector<S, R1> selector1, Selector<S, R2> selector2, Selector<S, R3> selector3, T mapFn(R1, R2, R3, dynamic)) Selector<S, T>
Create a selector composed from three other selectors.
createSelector4<S, R1, R2, R3, R4, T>(Selector<S, R1> selector1, Selector<S, R2> selector2, Selector<S, R3> selector3, Selector<S, R4> selector4, T mapFn(R1, R2, R3, R4, dynamic)) Selector<S, T>
Create a selector composed from four other selectors.
createSelector5<S, R1, R2, R3, R4, R5, T>(Selector<S, R1> selector1, Selector<S, R2> selector2, Selector<S, R3> selector3, Selector<S, R4> selector4, Selector<S, R5> selector5, T mapFn(R1, R2, R3, R4, R5, dynamic)) Selector<S, T>
Create a selector composed from five other selectors.
createSelector6<S, R1, R2, R3, R4, R5, R6, T>(Selector<S, R1> selector1, Selector<S, R2> selector2, Selector<S, R3> selector3, Selector<S, R4> selector4, Selector<S, R5> selector5, Selector<S, R6> selector6, T mapFn(R1, R2, R3, R4, R5, R6, dynamic)) Selector<S, T>
Create a selector composed from six other selectors.
createSelector7<S, R1, R2, R3, R4, R5, R6, R7, T>(Selector<S, R1> selector1, Selector<S, R2> selector2, Selector<S, R3> selector3, Selector<S, R4> selector4, Selector<S, R5> selector5, Selector<S, R6> selector6, Selector<S, R7> selector7, T mapFn(R1, R2, R3, R4, R5, R6, R7, dynamic)) Selector<S, T>
Create a selector composed from seven other selectors.
createSelector8<S, R1, R2, R3, R4, R5, R6, R7, R8, T>(Selector<S, R1> selector1, Selector<S, R2> selector2, Selector<S, R3> selector3, Selector<S, R4> selector4, Selector<S, R5> selector5, Selector<S, R6> selector6, Selector<S, R7> selector7, Selector<S, R8> selector8, T mapFn(R1, R2, R3, R4, R5, R6, R7, R8, dynamic)) Selector<S, T>
Create a selector composed from eight other selectors.
createSelector9<S, R1, R2, R3, R4, R5, R6, R7, R8, R9, T>(Selector<S, R1> selector1, Selector<S, R2> selector2, Selector<S, R3> selector3, Selector<S, R4> selector4, Selector<S, R5> selector5, Selector<S, R6> selector6, Selector<S, R7> selector7, Selector<S, R8> selector8, Selector<S, R9> selector9, T mapFn(R1, R2, R3, R4, R5, R6, R7, R8, R9, dynamic)) Selector<S, T>
Create a selector composed from nine other selectors.

Typedefs

ActionReducer<State, Action extends StoreAction> = State Function(State state, Action action)
A Reducer function that accepts a StoreAction of a specific type.
Effect<State extends StoreState> = Stream Function(BehaviorSubject<StoreAction>, Store<State> store)
A function that handles an incoming stream of actions, optionally performs side effects upon receiving an action, and optionally returns a new StoreAction which will be dispatched by the store.
Reducer<State> = State Function(State state, StoreAction action)
A function that takes a StoreAction and a State, and returns a new State.
Selector<S, T> = T Function(S state, dynamic props)