combineReducerBuilder method

void combineReducerBuilder(
  1. ReducerBuilder<NestedState, NestedStateBuilder> other
)

combineReducerBuilder takes a ReducerBuilder with the type arguments NestedState, NestedStateBuilder, and combines it with this NestedReducerBuilder.

Implementation

void combineReducerBuilder(
    ReducerBuilder<NestedState, NestedStateBuilder> other) {
  final adapted = other._map.map((name, reducer) => MapEntry(
      name,
      (State state, Action<dynamic> action, StateBuilder builder) => reducer(
            _stateMapper(state),
            action,
            _builderMapper(builder),
          )));
  _map.addAll(adapted);
}