materialAppReducer top-level property
The default reducer for MaterialAppState that handles MaterialAppAction.setLocale and MaterialAppAction.setBrightness.
Implementation
final Reducer<MaterialAppState, MaterialAppAction, EmptyEnvironment> materialAppReducer = Reducer.transform(
(state, action, env) => switch (action) {
MaterialAppActionSetLocale(:final locale) => state.copyWith(locale: locale),
MaterialAppActionSetBrightness(:final brightness) => state.copyWith(brightness: brightness)
},
);