Skip to content

Instantly share code, notes, and snippets.

@AseemWangoo
Created September 6, 2022 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AseemWangoo/1a8e06501c033ba312dc86b09bde3d7c to your computer and use it in GitHub Desktop.
Save AseemWangoo/1a8e06501c033ba312dc86b09bde3d7c to your computer and use it in GitHub Desktop.
view_model
late HomeViewModel viewModel;
@override
void initState() {
viewModel = Provider.of<HomeViewModel>(context, listen: false);
WidgetsBinding.instance.addPostFrameCallback((_) {
viewModel.fetchData();
});
super.initState();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment