Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Created December 14, 2019 22:29
Show Gist options
  • Select an option

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

Select an option

Save juliuscanute/173243c0ebfeefd22e44b3bef663f4a6 to your computer and use it in GitHub Desktop.
Display progress indicator during data retrieval view model
class _ViewModel {
final Store<EmotionAppState> store;
const _ViewModel({this.store});
static _ViewModel fromStore(Store<EmotionAppState> store) {
return _ViewModel(store: store);
}
bool isLoading() => !store.state.loadComplete;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment