todos-contra-el-fuego-mobile/lib/redux/appReducer.dart
Vicente J. Ruiz Jurado 5ecc3c3401 Fire notifications
2018-07-26 19:13:12 +02:00

12 lines
No EOL
389 B
Dart

import 'actions.dart';
import '../models/appState.dart';
AppState appReducer(AppState state, action) {
if (action is FetchYourLocationsSucceededAction) {
return state.copyWith(yourLocations: action.fetchedYourLocations);
}
if (action is FetchFireNotificationsSucceededAction) {
return state.copyWith(fireNotifications: action.fetchedFireNotifications);
}
return state;
}