Last active
May 14, 2022 21:13
-
-
Save ndungudedan/f1904903b275797ae98ce467fee4f244 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
void main() { | |
runApp(TestingApp()); | |
} | |
class TestingApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return ChangeNotifierProvider<Favorites>( | |
create: (context) => Favorites(), | |
child: MaterialApp( | |
title: 'Testing Sample', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
visualDensity: VisualDensity.adaptivePlatformDensity, | |
), | |
routes: AppRoutes().generateRoutes(), | |
initialRoute: HomePage.routeName, | |
), | |
); | |
} | |
} | |
class AppRoutes { | |
generateRoutes() { | |
return { | |
HomePage.routeName: (context) => HomePage(), | |
FavoritesPage.routeName: (context) => FavoritesPage(), | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment