Last active
May 14, 2022 21:39
-
-
Save ndungudedan/72cdeb7f7c4c43c5fa32f6df997ee2c7 to your computer and use it in GitHub Desktop.
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
//We create a helper function to return a material app for us. | |
//Since we using Provider for state management, | |
//we initialize it here also | |
Widget createHomeScreen() => ChangeNotifierProvider<Favorites>( | |
create: (context) => Favorites(), | |
child: MaterialApp( | |
routes: AppRoutes().generateRoutes(), | |
initialRoute: HomePage.routeName, | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment