Created
February 28, 2021 16:38
-
-
Save anubhav11803451/2fc6c8e7486e54eb3ff9933c736254f7 to your computer and use it in GitHub Desktop.
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
| Widget build(BuildContext context) { | |
| return StoreConnector<AppState, AuthViewModel>( | |
| onInit: (store) { | |
| store.dispatch(getAuthStateThunk()); | |
| SecureStorage.readSecureStorage('token').then((value) => token = value); | |
| }, | |
| converter: (store) => AuthViewModel.fromStore(store), | |
| builder: (context, viewModel) => | |
| token != null ? MyWorkspacesPage() : GettingStartedScreen(), | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment