ReducerBuilder<State extends Built<State, StateBuilder>, StateBuilder extends Builder<State, StateBuilder>> class

ReducerBuilder allows you to build a reducer that handles many different actions with many different payload types, while maintaining type safety. Each Reducer added with add

Constructors

ReducerBuilder()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add<Payload>(ActionName<Payload> actionName, Reducer<State, StateBuilder, Payload> reducer) → void
Registers reducer function to the given actionName
build() Reducer<State, StateBuilder, dynamic>
build returns a reducer function that can be passed to a Store.
combine(ReducerBuilder<State, StateBuilder> other) → void
combine combines this ReducerBuilder with another ReducerBuilder for the same type
combineAbstract(Map<String, Reducer<State, StateBuilder, dynamic>> other) → void
combineAbstract combines this ReducerBuilder with an AbstractReducerBuilder. This function takes the result of AbstractReducerBuilder's .build() function, which is a map. It does not take an AbstractReducerBuilder directly.
combineList<T>(ListReducerBuilder<State, StateBuilder, T> other) → void
combineList combines this ReducerBuilder with a ListReducerBuilder
combineListMultimap<K, V>(ListMultimapReducerBuilder<State, StateBuilder, K, V> other) → void
combineListMultimap combines this ReducerBuilder with a ListMultimapReducerBuilder
combineMap<K, V>(MapReducerBuilder<State, StateBuilder, K, V> other) → void
combineMap combines this ReducerBuilder with a MapReducerBuilder
combineNested<N extends Built<N, NB>, NB extends Builder<N, NB>>(NestedReducerBuilder<State, StateBuilder, N, NB> nested) → void
combineNested combines this ReducerBuilder with a NestedReducerBuilder
combineSet<T>(SetReducerBuilder<State, StateBuilder, T> other) → void
combineSet combines this ReducerBuilder with a SetReducerBuilder
combineSetMultimap<K, V>(SetMultimapReducerBuilder<State, StateBuilder, K, V> other) → void
combineSetMultimap combines this ReducerBuilder with a SetMultimapReducerBuilder
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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