diff --git a/lib/landing_page.dart b/lib/landing_page.dart index 33be147..09da76b 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -1,9 +1,11 @@ import 'package:flutter/material.dart'; import 'package:animated_text_kit/animated_text_kit.dart'; -import 'pages/home.dart'; +import 'package:learn/utils/route/route_constant.dart'; class LandingPage extends StatefulWidget { - const LandingPage({super.key}); + const LandingPage({ + super.key, + }); @override State createState() => _LandingPageState(); @@ -18,88 +20,89 @@ class _LandingPageState extends State { body: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(20), - child: Container( - child: Column( - children: [ - - Center( - child: Container( - width: width, - height: height/2, - decoration: const BoxDecoration( - image: DecorationImage( + child: Column( + children: [ + Center( + child: Container( + width: width, + height: height / 2, + decoration: const BoxDecoration( + image: DecorationImage( image: AssetImage("assets/images/studying.png"), - fit: BoxFit.contain - ), - ), + fit: BoxFit.contain), ), ), - - Center( - child: SizedBox( - child: DefaultTextStyle( - style: TextStyle( - fontSize: width/19, - ), - child: AnimatedTextKit( - animatedTexts: [ - ColorizeAnimatedText( - 'Learn', - textStyle: TextStyle(fontSize: width/12, fontWeight: FontWeight.w900), - colors: [ const Color.fromRGBO(255, 183, 77, 1),const Color.fromARGB(255, 231, 225, 208)], - ), - ], - isRepeatingAnimation: true, - ), + ), + + Center( + child: SizedBox( + child: DefaultTextStyle( + style: TextStyle( + fontSize: width / 19, + ), + child: AnimatedTextKit( + animatedTexts: [ + ColorizeAnimatedText( + 'Learn', + textStyle: TextStyle( + fontSize: width / 12, + fontWeight: FontWeight.w900), + colors: [ + const Color.fromRGBO(255, 183, 77, 1), + const Color.fromARGB(255, 231, 225, 208) + ], + ), + ], + isRepeatingAnimation: true, ), ), ), + ), const Padding(padding: EdgeInsets.only(top: 20)), - // - Center( - child: SizedBox( - child: Text( - "Learning Made Easy", - style: TextStyle( - fontWeight: FontWeight.w400, - fontSize: width/18 - ), - ), + // + Center( + child: SizedBox( + child: Text( + "Learning Made Easy", + style: TextStyle( + fontWeight: FontWeight.w400, fontSize: width / 18), ), ), - - const Padding(padding: EdgeInsets.only(top: 30)), + ), + + const Padding(padding: EdgeInsets.only(top: 30)), - Center( - child: SizedBox( - width: width/1.5, - height: height/10, - child: ElevatedButton( - style: ElevatedButton.styleFrom( + Center( + child: SizedBox( + width: width / 1.5, + height: height / 10, + child: ElevatedButton( + style: ElevatedButton.styleFrom( backgroundColor: const Color.fromRGBO(255, 183, 77, 1), shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(20)), - ) - ), - onPressed: () { - Navigator.push(context, MaterialPageRoute(builder: (context) => MyHomePage())); - }, - child: Text("Get started", - style: TextStyle( + )), + onPressed: () { + Navigator.popAndPushNamed( + context, + AllRoutesConstant.mainhome, + ); + }, + child: Text( + "Get started", + style: TextStyle( color: Colors.white, - fontSize: (width < height) ? width/19 : height/19 - ), - ), + fontSize: + (width < height) ? width / 19 : height / 19), ), ), ), - - ], - ), + ), + ], ), ), ), ); } -} \ No newline at end of file +} diff --git a/lib/main.dart b/lib/main.dart index 8739239..f3b3b3c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,27 +1,7 @@ import 'package:flutter/material.dart'; import 'package:adaptive_theme/adaptive_theme.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:learn/pages/about.dart'; -import 'package:learn/pages/modules/flowers.dart'; -import 'package:learn/pages/modules/atoz.dart'; -import 'package:learn/pages/modules/birds.dart'; -import 'package:learn/pages/modules/animals.dart'; -import 'package:learn/pages/fruits.dart'; -import 'package:learn/pages/explore.dart'; -import 'package:learn/pages/favorite.dart'; -import 'package:learn/pages/modules/occupation.dart'; -import 'package:learn/pages/modules/parts.dart'; -import 'package:learn/pages/modules/seasons.dart'; -import 'package:learn/pages/modules/shapes.dart'; -import 'package:learn/pages/modules/planets.dart'; -import 'package:learn/utils/routes.dart'; -import 'package:learn/pages/modules/colours.dart'; -import 'package:learn/widgets/navbar/navbar.dart'; - -import 'cubit/index_cubit.dart'; -import 'pages/explore/quiz.dart'; -import 'pages/home.dart'; -import 'landing_page.dart'; +import 'package:learn/landing_page.dart'; +import 'package:learn/utils/route/routes.dart'; DateTime? currentBackPressTime; @@ -38,52 +18,12 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return AdaptiveTheme( - light: ThemeData.light(), - dark: ThemeData.dark(), - initial: savedThemeMode ?? AdaptiveThemeMode.light, - builder: (theme, darkTheme) => BlocProvider( - create: (context) => IndexCubit(), - child: BlocBuilder( - builder: (context, index) { - return MaterialApp( - debugShowCheckedModeBanner: false, - title: 'Home', - theme: theme, - darkTheme: darkTheme, - initialRoute: '/landing_page', - home: Scaffold( - body: const [ - MyHomePage(), - ExplorePage(), - FavoritePage(), - AboutPage(), - ][index], - bottomNavigationBar: const BottomNavBar(), - ), - routes: { - AllRoutes.homeRoute: (context) => const MyHomePage(), - AllRoutes.atozRoute: (context) => const AtoZ(), - AllRoutes.birdsRoute: (context) => BirdsPage(), - AllRoutes.shapesRoute: (context) => const ShapesPage(), - AllRoutes.partsRoute: (context) => const PartsPage(), - AllRoutes.solarRoute: (context) => PlanetsPage(), - AllRoutes.animalRoute: (context) => AnimalsPage(), - AllRoutes.colourRoute: (context) => const ColoursPage(), - AllRoutes.aboutRoute: (context) => const AboutPage(), - AllRoutes.flowerRoute: (context) => const FlowerPage(), - AllRoutes.exploreRoute: (context) => const ExplorePage(), - AllRoutes.favoriteRoute: (context) => const FavoritePage(), - AllRoutes.quizRoute: (context) => const QuizPage(), - AllRoutes.seasonRoute: (context) => const SeasonsPage(), - AllRoutes.occupationRoute: (context) => OccupationPage(), - AllRoutes.fruitRoute: (context) => FruitsPage(), - "/landing_page": (context) => const LandingPage(), - }, - ); - }, - ), - ), + return const MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Learn', + themeMode: ThemeMode.system, + home: LandingPage(), + onGenerateRoute: Routers.generateRoute, ); } } diff --git a/lib/pages/home.dart b/lib/pages/home.dart index bf0100a..dcb346e 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -1,11 +1,8 @@ import 'package:adaptive_theme/adaptive_theme.dart'; import 'package:flutter/material.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:learn/main.dart'; import 'package:learn/utils/assets_path.dart'; import 'package:learn/utils/const_dimensions.dart'; - -import '../utils/routes.dart'; +import 'package:learn/utils/route/route_constant.dart'; import '../widgets/drawer.dart'; class MyHomePage extends StatefulWidget { @@ -19,140 +16,122 @@ class _MyHomePageState extends State { final List _isImageClicked = List.generate(7, (index) => false); bool _isDarkTheme = false; - Future _onBackPressed() { - DateTime now = DateTime.now(); - if (currentBackPressTime == null || - now.difference(currentBackPressTime!) > const Duration(seconds: 2)) { - currentBackPressTime = now; - Fluttertoast.showToast( - msg: "Press back again to exit", - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - ); - return Future.value(false); - } - return Future.value(true); - } - @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: _onBackPressed, - child: Scaffold( - appBar: AppBar( - title: const Text( - 'Home', - style: TextStyle(fontWeight: FontWeight.bold), - ), - actions: [ - Padding( - padding: const EdgeInsets.only(right: 16, top: 1), - child: IconButton( - icon: Icon( - _isDarkTheme ? Icons.dark_mode : Icons.light_mode, - ), - onPressed: () { - setState(() { - _isDarkTheme = !_isDarkTheme; - }); - final themeMode = - Theme.of(context).brightness == Brightness.dark - ? AdaptiveThemeMode.light - : AdaptiveThemeMode.dark; - AdaptiveTheme.of(context).setThemeMode(themeMode); - }, - ), - ), - ], + return Scaffold( + appBar: AppBar( + title: const Text( + 'Home', + style: TextStyle(fontWeight: FontWeight.bold), ), - body: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(38.0), - child: Column( - children: [ - categoryCard( - context: context, - title: "ALPHABETS", - image: AssetsPath.getAlphabetImage(Alphabets.alphabets), - shortDescription: - "Learn A to Z with pronunciation and an example", - route: AllRoutes.atozRoute, - index: 0, - ), - const SizedBox( - height: ConstantDimensions.heightMedium, - ), - categoryCard( - context: context, - title: "ANIMALS", - image: AssetsPath.getAnimalImage(Animals.animals), - shortDescription: "Learn about animals and their voices", - route: AllRoutes.animalRoute, - index: 1, - ), - const SizedBox( - height: ConstantDimensions.heightMedium, - ), - categoryCard( - context: context, - title: "BODY PARTS", - image: AssetsPath.getBodyImage(Body.body), - shortDescription: - "Know about body parts and their pronunciation.", - route: AllRoutes.partsRoute, - index: 2, - ), - const SizedBox( - height: ConstantDimensions.heightMedium, - ), - categoryCard( - context: context, - title: "BIRDS", - image: AssetsPath.getBirdImage(Birds.birds), - shortDescription: "Look out for Birds with their sounds.", - route: AllRoutes.birdsRoute, - index: 3, - ), - const SizedBox( - height: ConstantDimensions.heightMedium, - ), - categoryCard( - context: context, - title: "COLOURS", - image: AssetsPath.getColoursImage(ColorImages.colorsCover), - shortDescription: "Explore and learn about the colours!", - route: AllRoutes.colourRoute, - index: 4, - ), - const SizedBox( - height: ConstantDimensions.heightMedium, - ), - categoryCard( - context: context, - title: "FLOWERS", - image: AssetsPath.getFlowerImage(Flowers.flowerBanner), - shortDescription: "Explore beauty of nature flowers.", - route: AllRoutes.flowerRoute, - index: 5, - ), - const SizedBox( - height: ConstantDimensions.heightMedium, - ), - categoryCard( - context: context, - title: "FRUITS & VEGETABLES", - image: 'assets/fruitsVeges/cover.jpg', - shortDescription: - "Explore and learn about Fruits and Vegetables!", - route: AllRoutes.fruitRoute, - index: 6, - ), - ], + actions: [ + Padding( + padding: const EdgeInsets.only(right: 16, top: 1), + child: IconButton( + icon: Icon( + _isDarkTheme ? Icons.dark_mode : Icons.light_mode, + ), + onPressed: () { + setState(() { + _isDarkTheme = !_isDarkTheme; + }); + final themeMode = + Theme.of(context).brightness == Brightness.dark + ? AdaptiveThemeMode.light + : AdaptiveThemeMode.dark; + AdaptiveTheme.of(context).setThemeMode(themeMode); + }, ), ), + ], + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(38.0), + child: Column( + children: [ + categoryCard( + context: context, + title: "ALPHABETS", + image: AssetsPath.getAlphabetImage(Alphabets.alphabets), + shortDescription: + "Learn A to Z with pronunciation and an example", + route: AllRoutesConstant.atozRoute, + index: 0, + ), + const SizedBox( + height: ConstantDimensions.heightMedium, + ), + categoryCard( + context: context, + title: "ANIMALS", + image: AssetsPath.getAnimalImage(Animals.animals), + shortDescription: "Learn about animals and their voices", + route: AllRoutesConstant.animalRoute, + index: 1, + ), + const SizedBox( + height: ConstantDimensions.heightMedium, + ), + categoryCard( + context: context, + title: "BODY PARTS", + image: AssetsPath.getBodyImage(Body.body), + shortDescription: + "Know about body parts and their pronunciation.", + route: AllRoutesConstant.partsRoute, + index: 2, + ), + const SizedBox( + height: ConstantDimensions.heightMedium, + ), + categoryCard( + context: context, + title: "BIRDS", + image: AssetsPath.getBirdImage(Birds.birds), + shortDescription: "Look out for Birds with their sounds.", + route: AllRoutesConstant.birdsRoute, + index: 3, + ), + const SizedBox( + height: ConstantDimensions.heightMedium, + ), + categoryCard( + context: context, + title: "COLOURS", + image: AssetsPath.getColoursImage(ColorImages.colorsCover), + shortDescription: "Explore and learn about the colours!", + route: AllRoutesConstant.colourRoute, + index: 4, + ), + const SizedBox( + height: ConstantDimensions.heightMedium, + ), + categoryCard( + context: context, + title: "FLOWERS", + image: AssetsPath.getFlowerImage(Flowers.flowerBanner), + shortDescription: "Explore beauty of nature flowers.", + route: AllRoutesConstant.flowerRoute, + index: 5, + ), + const SizedBox( + height: ConstantDimensions.heightMedium, + ), + categoryCard( + context: context, + title: "FRUITS & VEGETABLES", + image: 'assets/fruitsVeges/cover.jpg', + shortDescription: + "Explore and learn about Fruits and Vegetables!", + route: AllRoutesConstant.fruitRoute, + index: 6, + ), + ], + ), ), - drawer: const MyDrawer(), ), + drawer: const MyDrawer(), ); } diff --git a/lib/pages/main_home.dart b/lib/pages/main_home.dart new file mode 100644 index 0000000..3c38b3d --- /dev/null +++ b/lib/pages/main_home.dart @@ -0,0 +1,67 @@ +import 'package:adaptive_theme/adaptive_theme.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:learn/cubit/index_cubit.dart'; +import 'package:learn/main.dart'; +import 'package:learn/pages/about.dart'; +import 'package:learn/pages/explore/explore.dart'; +import 'package:learn/pages/favorite.dart'; +import 'package:learn/pages/home.dart'; +import 'package:learn/widgets/navbar/navbar.dart'; + +class MainHome extends StatefulWidget { + final AdaptiveThemeMode? savedThemeMode; + const MainHome({ + super.key, + this.savedThemeMode, + }); + + @override + State createState() => _MainHomeState(); +} + +class _MainHomeState extends State { + Future _onBackPressed() { + DateTime now = DateTime.now(); + if (currentBackPressTime == null || + now.difference(currentBackPressTime!) > const Duration(seconds: 2)) { + currentBackPressTime = now; + Fluttertoast.showToast( + msg: "Press back again to exit", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + ); + return Future.value(false); + } + return Future.value(true); + } + + @override + Widget build(BuildContext context) { + return WillPopScope( + onWillPop: _onBackPressed, + child: AdaptiveTheme( + light: ThemeData.light(), + dark: ThemeData.dark(), + initial: widget.savedThemeMode ?? AdaptiveThemeMode.light, + builder: (theme, darkTheme) => BlocProvider( + create: (context) => IndexCubit(), + child: BlocBuilder( + builder: (context, index) { + return Scaffold( + body: const [ + MyHomePage(), + ExplorePage(), + FavoritePage(), + AboutPage(), + ][index], + bottomNavigationBar: const BottomNavBar(), + ); + }, + ), + ), + ), + ); + } +} diff --git a/lib/utils/route/page_transtion.dart b/lib/utils/route/page_transtion.dart new file mode 100644 index 0000000..0a9ae7a --- /dev/null +++ b/lib/utils/route/page_transtion.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; + +PageRouteBuilder slidePageRoute(Widget destinationScreen) { + return PageRouteBuilder( + pageBuilder: (context, animation, secondaryAnimation) { + return destinationScreen; // Navigate to the provided destination screen + }, + transitionsBuilder: (context, animation, secondaryAnimation, child) { + var curvedAnimation = CurvedAnimation( + parent: animation, + curve: Curves.easeOutQuad, + ); + + return FadeTransition( + opacity: curvedAnimation, + child: child, + ); + }, + ); +} diff --git a/lib/utils/routes.dart b/lib/utils/route/route_constant.dart similarity index 86% rename from lib/utils/routes.dart rename to lib/utils/route/route_constant.dart index c64b442..c1700ec 100644 --- a/lib/utils/routes.dart +++ b/lib/utils/route/route_constant.dart @@ -1,4 +1,4 @@ -class AllRoutes { +class AllRoutesConstant { static const String loginRoute = "/login"; static const String homeRoute = "/home"; static const String exploreRoute = "/explore"; @@ -16,4 +16,6 @@ class AllRoutes { static const String seasonRoute = "/seasons"; static const String occupationRoute = '/occupations'; static const String fruitRoute = "/fruit"; + static const String landing = '/landing_page'; + static const String mainhome = '/mainhome'; } diff --git a/lib/utils/route/routes.dart b/lib/utils/route/routes.dart new file mode 100644 index 0000000..e6c8de0 --- /dev/null +++ b/lib/utils/route/routes.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:learn/landing_page.dart'; +import 'package:learn/pages/about.dart'; +import 'package:learn/pages/explore.dart'; +import 'package:learn/pages/explore/quiz.dart'; +import 'package:learn/pages/favorite.dart'; +import 'package:learn/pages/fruits.dart'; +import 'package:learn/pages/home.dart'; +import 'package:learn/pages/main_home.dart'; +import 'package:learn/pages/modules/animals.dart'; +import 'package:learn/pages/modules/atoz.dart'; +import 'package:learn/pages/modules/birds.dart'; +import 'package:learn/pages/modules/colours.dart'; +import 'package:learn/pages/modules/flowers.dart'; +import 'package:learn/pages/modules/occupation.dart'; +import 'package:learn/pages/modules/parts.dart'; +import 'package:learn/pages/modules/planets.dart'; +import 'package:learn/pages/modules/seasons.dart'; +import 'package:learn/pages/modules/shapes.dart'; +import 'package:learn/utils/route/page_transtion.dart'; +import 'package:learn/utils/route/route_constant.dart'; + +class Routers { + static Route generateRoute(RouteSettings settings) { + switch (settings.name) { + case AllRoutesConstant.homeRoute: + return slidePageRoute(const MyHomePage()); + case AllRoutesConstant.exploreRoute: + return slidePageRoute(const ExplorePage()); + case AllRoutesConstant.atozRoute: + return slidePageRoute(const AtoZ()); + case AllRoutesConstant.birdsRoute: + return slidePageRoute(BirdsPage()); + case AllRoutesConstant.shapesRoute: + return slidePageRoute(const ShapesPage()); + case AllRoutesConstant.partsRoute: + return slidePageRoute(const PartsPage()); + case AllRoutesConstant.solarRoute: + return slidePageRoute(PlanetsPage()); + case AllRoutesConstant.animalRoute: + return slidePageRoute(AnimalsPage()); + case AllRoutesConstant.colourRoute: + return slidePageRoute(const ColoursPage()); + case AllRoutesConstant.aboutRoute: + return slidePageRoute(const AboutPage()); + case AllRoutesConstant.flowerRoute: + return slidePageRoute(const FlowerPage()); + case AllRoutesConstant.favoriteRoute: + return slidePageRoute(const FavoritePage()); + case AllRoutesConstant.quizRoute: + return slidePageRoute(const QuizPage()); + case AllRoutesConstant.seasonRoute: + return slidePageRoute(const SeasonsPage()); + case AllRoutesConstant.occupationRoute: + return slidePageRoute(OccupationPage()); + case AllRoutesConstant.fruitRoute: + return slidePageRoute(FruitsPage()); + case AllRoutesConstant.landing: + return slidePageRoute(const LandingPage()); + case AllRoutesConstant.mainhome: + return slidePageRoute(MainHome()); + default: + return MaterialPageRoute( + builder: (context) => const Scaffold( + body: Center( + child: Text('No route found'), + ), + ), + ); + } + } +} diff --git a/lib/widgets/drawer.dart b/lib/widgets/drawer.dart index aac74bb..e107f50 100644 --- a/lib/widgets/drawer.dart +++ b/lib/widgets/drawer.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:learn/utils/assets_path.dart'; -import 'package:learn/utils/routes.dart'; +import 'package:learn/utils/route/route_constant.dart'; class MyDrawer extends StatelessWidget { const MyDrawer({Key? key}) : super(key: key); @@ -17,10 +17,12 @@ class MyDrawer extends StatelessWidget { children: [ DrawerHeader( padding: const EdgeInsets.all(0), - decoration: BoxDecoration(color: Theme.of(context).canvasColor), + decoration: + BoxDecoration(color: Theme.of(context).canvasColor), child: UserAccountsDrawerHeader( margin: const EdgeInsets.all(0), - decoration: BoxDecoration(color: Theme.of(context).canvasColor), + decoration: + BoxDecoration(color: Theme.of(context).canvasColor), accountName: Text( "Learning App for kids", style: Theme.of(context) @@ -41,7 +43,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.home, title: "Home", onTap: () { - Navigator.pushReplacementNamed(context, AllRoutes.homeRoute); + Navigator.pushNamed(context, AllRoutesConstant.homeRoute); }, context: context, ), @@ -49,7 +51,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.text_fields, title: "A - Z", onTap: () { - Navigator.pushNamed(context, AllRoutes.atozRoute); + Navigator.pushNamed(context, AllRoutesConstant.atozRoute); }, context: context, ), @@ -57,7 +59,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.pest_control_rodent_outlined, title: "Animals", onTap: () { - Navigator.pushNamed(context, AllRoutes.animalRoute); + Navigator.pushNamed(context, AllRoutesConstant.animalRoute); }, context: context, ), @@ -65,7 +67,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.egg, title: "Birds", onTap: () { - Navigator.pushNamed(context, AllRoutes.birdsRoute); + Navigator.pushNamed(context, AllRoutesConstant.birdsRoute); }, context: context, ), @@ -73,7 +75,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.cloud, title: "Seasons", onTap: () { - Navigator.pushNamed(context, AllRoutes.seasonRoute); + Navigator.pushNamed(context, AllRoutesConstant.seasonRoute); }, context: context, ), @@ -81,7 +83,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.pentagon_outlined, title: "Shapes", onTap: () { - Navigator.pushReplacementNamed(context, AllRoutes.shapesRoute); + Navigator.pushNamed(context, AllRoutesConstant.shapesRoute); }, context: context, ), @@ -89,7 +91,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.back_hand_rounded, title: "Body parts", onTap: () { - Navigator.pushNamed(context, AllRoutes.partsRoute); + Navigator.pushNamed(context, AllRoutesConstant.partsRoute); }, context: context, ), @@ -97,7 +99,8 @@ class MyDrawer extends StatelessWidget { icon: Icons.work, title: "Occupations", onTap: () { - Navigator.pushNamed(context, AllRoutes.occupationRoute); + Navigator.pushNamed( + context, AllRoutesConstant.occupationRoute); }, context: context, ), @@ -105,7 +108,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.sunny, title: "Solar System", onTap: () { - Navigator.pushNamed(context, AllRoutes.solarRoute); + Navigator.pushNamed(context, AllRoutesConstant.solarRoute); }, context: context, ), @@ -113,7 +116,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.palette, title: "Colours", onTap: () { - Navigator.pushNamed(context, AllRoutes.colourRoute); + Navigator.pushNamed(context, AllRoutesConstant.colourRoute); }, context: context, ), @@ -121,7 +124,7 @@ class MyDrawer extends StatelessWidget { icon: AssetsPath.getFlowerImage(Flowers.flowerIcon), title: "Flowers", onTap: () { - Navigator.pushNamed(context, AllRoutes.flowerRoute); + Navigator.pushNamed(context, AllRoutesConstant.flowerRoute); }, context: context, ), @@ -129,7 +132,7 @@ class MyDrawer extends StatelessWidget { icon: Icons.question_mark_outlined, title: "About us", onTap: () { - Navigator.pushNamed(context, AllRoutes.aboutRoute); + Navigator.pushNamed(context, AllRoutesConstant.aboutRoute); }, context: context, ), diff --git a/web/favicon.png b/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/web/favicon.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/web/icons/Icon-maskable-512.png differ