Skip to content

Instantly share code, notes, and snippets.

@swat-cat
Last active October 27, 2018 07:53
Show Gist options
  • Select an option

  • Save swat-cat/192aa7992a20f6f89f57ed0ab08faf35 to your computer and use it in GitHub Desktop.

Select an option

Save swat-cat/192aa7992a20f6f89f57ed0ab08faf35 to your computer and use it in GitHub Desktop.
child: new StoreConnector<AppState,LoginViewModel>(
onInit: (store){
store.dispatch(new ClearErrorsAction());
store.dispatch(new CheckTokenAction());
},
onDidChange: (viewModel){
if(viewModel.tokenReqeust == true){
if(viewModel.token.isEmpty()){
// TODO run animation
}else{
//TODO Navigate to home
}
}
},
converter: (store) => LoginViewModel.fromStore(store),
builder: (_, viewModel) => content(viewModel,constraints),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment