Created
September 6, 2022 14:15
-
-
Save AseemWangoo/1a8e06501c033ba312dc86b09bde3d7c to your computer and use it in GitHub Desktop.
view_model
This file contains 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
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