Created
December 14, 2019 22:12
-
-
Save juliuscanute/d6c8fba95532abc992cc4652d3ed7b01 to your computer and use it in GitHub Desktop.
Create a new state from loaded emotions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final emotionAppReducer = combineReducers<EmotionAppState>([ | |
| TypedReducer<EmotionAppState, LoadedEmotions>(_handleLoadedEmotions) | |
| ]); | |
| EmotionAppState _handleLoadedEmotions( | |
| EmotionAppState previousState, LoadedEmotions action) { | |
| EmotionAppState state; | |
| state = previousState.copy( | |
| newState: EmotionAppState(details: action.details, loadComplete: true)); | |
| return state; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment