Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Created December 14, 2019 21:53
Show Gist options
  • Select an option

  • Save juliuscanute/6daaa0a21bc84d3ab02286c7f5ffd9a9 to your computer and use it in GitHub Desktop.

Select an option

Save juliuscanute/6daaa0a21bc84d3ab02286c7f5ffd9a9 to your computer and use it in GitHub Desktop.
View Emotion Action
List<Middleware<EmotionAppState>> createLoginMiddleware(
[DataProvider provider]) {
final viewEmotion = _viewEmotions(provider);
return [
TypedMiddleware<EmotionAppState, ViewEmotion>(viewEmotion)
];
}
Middleware<EmotionAppState> _viewEmotions(DataProvider provider) {
return (Store<EmotionAppState> store, action, NextDispatcher next) async {
next(action);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment