Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Created December 15, 2019 05:48
Show Gist options
  • Select an option

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

Select an option

Save juliuscanute/d9fb9bb400965a29af7c0fc6a152df53 to your computer and use it in GitHub Desktop.
2.3 Move from screen [2] to [3]
class _ViewModel {
final Store<EmotionAppState> store;
const _ViewModel({this.store});
static _ViewModel fromStore(Store<EmotionAppState> store) {
return _ViewModel(store: store);
}
void addEmotionDescription(String emotionType, String emotionDescription) {
store.dispatch(NavigateToAction.push('/add-emotion', preNavigation: () {
//...
}));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment