import '../models/app_state.dart'; import 'app_reducer.dart'; import 'error_reducer.dart'; import 'fire_map_reducer.dart'; import 'fire_notification_reducer.dart'; import 'loaded_reducer.dart'; import 'loading_reducer.dart'; import 'user_reducer.dart'; import 'your_locations_reducer.dart'; // We create the State reducer by combining many smaller reducers into one! AppState appStateReducer(AppState prevState, dynamic action) { final AppState state = appReducer(prevState, action); return AppState( yourLocations: yourLocationsReducer(state.yourLocations, action), fireNotifications: fireNotificationReducer(state.fireNotifications, action), fireNotificationsUnread: state.fireNotificationsUnread, user: userReducer(state.user, action), isLoading: loadingReducer(state.isLoading, action), isLoaded: loadedReducer(state.isLoaded, action), error: errorReducer(state.error, action), fireMapState: fireMapReducer(state.fireMapState, action), monitoredAreas: state.monitoredAreas, firesApiKey: state.firesApiKey, firesApiUrl: state.firesApiUrl, serverUrl: state.serverUrl, gmapKey: state.gmapKey); }