Created
December 15, 2019 05:48
-
-
Save juliuscanute/d9fb9bb400965a29af7c0fc6a152df53 to your computer and use it in GitHub Desktop.
2.3 Move from screen [2] to [3]
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
| 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