From 8dcd97d715feea8ea72274a62bf22e8ae7092c17 Mon Sep 17 00:00:00 2001 From: Hetkumar Prajapati Date: Mon, 27 May 2024 12:47:55 +0530 Subject: [PATCH 01/16] BottomNavFixwithPageTransition --- lib/landing_page.dart | 131 +++++----- lib/main.dart | 76 +----- lib/pages/home.dart | 241 ++++++++---------- lib/pages/main_home.dart | 67 +++++ lib/utils/route/page_transtion.dart | 20 ++ .../route_constant.dart} | 4 +- lib/utils/route/routes.dart | 72 ++++++ lib/widgets/drawer.dart | 33 +-- web/favicon.png | Bin 0 -> 917 bytes web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes 11 files changed, 365 insertions(+), 279 deletions(-) create mode 100644 lib/pages/main_home.dart create mode 100644 lib/utils/route/page_transtion.dart rename lib/utils/{routes.dart => route/route_constant.dart} (86%) create mode 100644 lib/utils/route/routes.dart create mode 100644 web/favicon.png create mode 100644 web/icons/Icon-maskable-192.png create mode 100644 web/icons/Icon-maskable-512.png 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 0000000000000000000000000000000000000000..8aaa46ac1ae21512746f852a42ba87e4165dfdd1 GIT binary patch literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0X7 zltGxWVyS%@P(fs7NJL45ua8x7ey(0(N`6wRUPW#JP&EUCO@$SZnVVXYs8ErclUHn2 zVXFjIVFhG^g!Ppaz)DK8ZIvQ?0~DO|i&7O#^-S~(l1AfjnEK zjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(yU7!lx;>x^|#0uTKVr7USFmqf|i<65o z3raHc^AtelCMM;Vme?vOfh>Xph&xL%(-1c06+^uR^q@XSM&D4+Kp$>4P^%3{)XKjo zGZknv$b36P8?Z_gF{nK@`XI}Z90TzwSQO}0J1!f2c(B=V`5aP@1P1a|PZ!4!3&Gl8 zTYqUsf!gYFyJnXpu0!n&N*SYAX-%d(5gVjrHJWqXQshj@!Zm{!01WsQrH~9=kTxW#6SvuapgMqt>$=j#%eyGrQzr zP{L-3gsMA^$I1&gsBAEL+vxi1*Igl=8#8`5?A-T5=z-sk46WA1IUT)AIZHx1rdUrf zVJrJn<74DDw`j)Ki#gt}mIT-Q`XRa2-jQXQoI%w`nb|XblvzK${ZzlV)m-XcwC(od z71_OEC5Bt9GEXosOXaPTYOia#R4ID2TiU~`zVMl08TV_C%DnU4^+HE>9(CE4D6?Fz oujB08i7adh9xk7*FX66dWH6F5TM;?E2b5PlUHx3vIVCg!0Dx9vYXATM literal 0 HcmV?d00001 diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9b4d76e525556d5d89141648c724331630325d GIT binary patch literal 5594 zcmd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Xa!x_wE- z!#RpwHM#WrO*|~f7z}(}o7US(+0FYLM}6de>gQdtPazXz?OcNv4R^oYLJ_BQOd_l172oSK$6!1r@g+B@0ofJ4*{>_AIxfe-#xp>(1 z@Y3Nfd>fmqvjL;?+DmZk*KsfXJf<%~(gcLwEez%>1c6XSboURUh&k=B)MS>6kw9bY z{7vdev7;A}5fy*ZE23DS{J?8at~xwVk`pEwP5^k?XMQ7u64;KmFJ#POzdG#np~F&H ze-BUh@g54)dsS%nkBb}+GuUEKU~pHcYIg4vSo$J(J|U36bs0Use+3A&IMcR%6@jv$ z=+QI+@wW@?iu}Hpyzlvj-EYeop{f65GX0O%>w#0t|V z1-svWk`hU~m`|O$kw5?Yn5UhI%9P-<45A(v0ld1n+%Ziq&TVpBcV9n}L9Tus-TI)f zd_(g+nYCDR@+wYNQm1GwxhUN4tGMLCzDzPqY$~`l<47{+l<{FZ$L6(>J)|}!bi<)| zE35dl{a2)&leQ@LlDxLQOfUDS`;+ZQ4ozrleQwaR-K|@9T{#hB5Z^t#8 zC-d_G;B4;F#8A2EBL58s$zF-=SCr`P#z zNCTnHF&|X@q>SkAoYu>&s9v@zCpv9lLSH-UZzfhJh`EZA{X#%nqw@@aW^vPcfQrlPs(qQxmC|4tp^&sHy!H!2FH5eC{M@g;ElWNzlb-+ zxpfc0m4<}L){4|RZ>KReag2j%Ot_UKkgpJN!7Y_y3;Ssz{9 z!K3isRtaFtQII5^6}cm9RZd5nTp9psk&u1C(BY`(_tolBwzV_@0F*m%3G%Y?2utyS zY`xM0iDRT)yTyYukFeGQ&W@ReM+ADG1xu@ruq&^GK35`+2r}b^V!m1(VgH|QhIPDE X>c!)3PgKfL&lX^$Z>Cpu&6)6jvi^Z! literal 0 HcmV?d00001 diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000000000000000000000000000000000..d69c56691fbdb0b7efa65097c7cc1edac12a6d3e GIT binary patch literal 20998 zcmeFZ_gj-)&^4Nb2t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lB8J(&*l#(V}Id8SyQ0C(2amzkz3EqG&Ed0Jq1)$|&>4_|NIe=5|n=3?siFV0fI z{As5DLW^gs|B-b4C;Hd(SM-S~GQhzb>HgF2|2Usww0nL^;x@1eaB)=+Clj+$fF@H( z-fqP??~QMT$KI-#m;QC*&6vkp&8699G3)Bq0*kFZXINw=b9OVaed(3(3kS|IZ)CM? zJdnW&%t8MveBuK21uiYj)_a{Fnw0OErMzMN?d$QoPwkhOwcP&p+t>P)4tHlYw-pPN z^oJ=uc$Sl>pv@fZH~ZqxSvdhF@F1s=oZawpr^-#l{IIOGG=T%QXjtwPhIg-F@k@uIlr?J->Ia zpEUQ*=4g|XYn4Gez&aHr*;t$u3oODPmc2Ku)2Og|xjc%w;q!Zz+zY)*3{7V8bK4;& zYV82FZ+8?v)`J|G1w4I0fWdKg|2b#iaazCv;|?(W-q}$o&Y}Q5d@BRk^jL7#{kbCK zSgkyu;=DV+or2)AxCBgq-nj5=@n^`%T#V+xBGEkW4lCqrE)LMv#f;AvD__cQ@Eg3`~x| zW+h9mofSXCq5|M)9|ez(#X?-sxB%Go8};sJ?2abp(Y!lyi>k)|{M*Z$c{e1-K4ky` MPgg&ebxsLQ025IeI{*Lx literal 0 HcmV?d00001 From c7d9e17d6b85cc3bc90129acbd5d2428a698d57b Mon Sep 17 00:00:00 2001 From: AsmitaMishra24 <146121869+AsmitaMishra24@users.noreply.github.com> Date: Tue, 28 May 2024 00:03:01 +0530 Subject: [PATCH 02/16] Added Drawing Board --- assets/explore/drawing_board.svg | 26 ++++ lib/main.dart | 2 + lib/pages/explore/drawingboard.dart | 184 ++++++++++++++++++++++++++++ lib/pages/explore/explore.dart | 150 ++++++++++++++++------- lib/utils/routes.dart | 1 + 5 files changed, 317 insertions(+), 46 deletions(-) create mode 100644 assets/explore/drawing_board.svg create mode 100644 lib/pages/explore/drawingboard.dart diff --git a/assets/explore/drawing_board.svg b/assets/explore/drawing_board.svg new file mode 100644 index 0000000..d0a52e9 --- /dev/null +++ b/assets/explore/drawing_board.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/main.dart b/lib/main.dart index 8739239..de3e861 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,6 +19,7 @@ import 'package:learn/pages/modules/colours.dart'; import 'package:learn/widgets/navbar/navbar.dart'; import 'cubit/index_cubit.dart'; +import 'pages/explore/drawingboard.dart'; import 'pages/explore/quiz.dart'; import 'pages/home.dart'; import 'landing_page.dart'; @@ -78,6 +79,7 @@ class MyApp extends StatelessWidget { AllRoutes.seasonRoute: (context) => const SeasonsPage(), AllRoutes.occupationRoute: (context) => OccupationPage(), AllRoutes.fruitRoute: (context) => FruitsPage(), + AllRoutes.drawingboardRoute: (context) => DrawingBoardPage(), "/landing_page": (context) => const LandingPage(), }, ); diff --git a/lib/pages/explore/drawingboard.dart b/lib/pages/explore/drawingboard.dart new file mode 100644 index 0000000..556c25f --- /dev/null +++ b/lib/pages/explore/drawingboard.dart @@ -0,0 +1,184 @@ +import 'dart:ui'; +import 'package:flutter/material.dart'; + +class DrawingBoardPage extends StatelessWidget { + const DrawingBoardPage({Key? key}); + + @override + Widget build(BuildContext context) { + return DrawingBoard(); + } +} + +class DrawingBoard extends StatefulWidget { + const DrawingBoard({Key? key}) : super(key: key); + + @override + _DrawingBoardState createState() => _DrawingBoardState(); +} + +class _DrawingBoardState extends State { + Color selectedColor = Colors.black; + double strokeWidth = 5; + List drawingPoints = []; + List colors = [ + Colors.pink, + Colors.red, + Colors.blue, + Colors.orange, + Colors.yellow, + Colors.purple, + Colors.green, + Colors.black, + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Drawing Board"), + actions: [ + IconButton( + icon:Icon(Icons.clear), + onPressed: () => setState(() => drawingPoints = []), + ), + ], + ), + body: Stack( + children: [ + GestureDetector( + onPanStart: (details) { + setState(() { + drawingPoints.add( + DrawingPoint( + details.localPosition, + Paint() + ..color = selectedColor + ..isAntiAlias = true + ..strokeWidth = strokeWidth + ..strokeCap = StrokeCap.round, + ), + ); + }); + }, + onPanUpdate: (details) { + setState(() { + drawingPoints.add( + DrawingPoint( + details.localPosition, + Paint() + ..color = selectedColor + ..isAntiAlias = true + ..strokeWidth = strokeWidth + ..strokeCap = StrokeCap.round, + ), + ); + }); + }, + onPanEnd: (details) { + setState(() { + drawingPoints.add(null); + }); + }, + child: CustomPaint( + painter: _DrawingPainter(drawingPoints), + child: Container( + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + ), + ), + ), + Positioned( + top: 40, + right: 30, + child: Row( + children: [ + Slider( + min: 0, + max: 40, + value: strokeWidth, + onChanged:(val) => setState(() => strokeWidth = val), + ), + + ElevatedButton.icon(onPressed: () => setState(() => drawingPoints = []), + icon: Icon(Icons.clear), + label: Text("Clear Board"), + ), + ], + ), + ), + ], + ), + + bottomNavigationBar: BottomAppBar( + child: Container( + color: Colors.grey[200], + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: List.generate( + colors.length, + (index) => _buildColorChoser(colors[index]), + ), + ), + ), + ), + ); + } + + GestureDetector _buildColorChoser(Color color) { + bool isSelected = selectedColor == color; + return GestureDetector( + onTap: () => setState(() => selectedColor = color), + child: Container( + height: isSelected ? 47 : 40, + width: isSelected ? 47 : 40, + decoration: BoxDecoration( + color: color, + shape: BoxShape.circle, + border: isSelected + ? Border.all( + color: Colors.white, + width: 3, + ) + : null, + ), + ), + ); + } +} + +class _DrawingPainter extends CustomPainter { + final List drawingPoints; + + _DrawingPainter(this.drawingPoints); + + @override + void paint(Canvas canvas, Size size) { + for (int i = 0; i < drawingPoints.length - 1; i++) { + if (drawingPoints[i] != null && drawingPoints[i + 1] != null) { + canvas.drawLine( + drawingPoints[i]!.offset, + drawingPoints[i + 1]!.offset, + drawingPoints[i]!.paint, + ); + } else if (drawingPoints[i] != null && drawingPoints[i + 1] == null) { + canvas.drawPoints( + PointMode.points, + [drawingPoints[i]!.offset], + drawingPoints[i]!.paint, + ); + } + } + } + + @override + bool shouldRepaint(covariant CustomPainter oldDelegate) => true; +} + +class DrawingPoint { + Offset offset; + Paint paint; + + DrawingPoint(this.offset, this.paint); +} diff --git a/lib/pages/explore/explore.dart b/lib/pages/explore/explore.dart index f8b868b..63b4ae9 100644 --- a/lib/pages/explore/explore.dart +++ b/lib/pages/explore/explore.dart @@ -1,10 +1,9 @@ import 'dart:ui'; - import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:learn/utils/const_dimensions.dart'; import 'package:learn/utils/constants.dart'; - -import '../../utils/const_dimensions.dart'; +import '../../utils/routes.dart'; // Explore Page class ExplorePage extends StatelessWidget { @@ -27,49 +26,9 @@ class ExplorePage extends StatelessWidget { ), ), ), - SliverList( - delegate: SliverChildListDelegate( - [ - GestureDetector( - onTap: () { - Navigator.pushNamed(context, '/quiz'); - }, - child: Container( - margin: const EdgeInsets.all(5.0), - padding: const EdgeInsets.all(8.0), - decoration: BoxDecoration( - border: Border.all(color: Colors.black, width: 1.0), - borderRadius: BorderRadius.circular(8.0), - color: Colors.blueAccent, - ), - child: Row( - children: [ - SizedBox( - width: ConstantDimensions.widthExtraLarge, - height: ConstantDimensions.heightExtraLarge, - child: - SvgPicture.asset('assets/explore/notebook.svg'), - ), - const SizedBox(width: ConstantDimensions.widthMedium_Large), - const Text( - 'Quiz', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 30.0, - fontFamily: 'Comic', - color: Colors.white, - ), - ), - ], - ), - ), - ), - ], - ), - ), SliverList( delegate: SliverChildBuilderDelegate( - (context, index) { + (context, index) { return GestureDetector( onTap: () => Navigator.push( context, @@ -97,8 +56,7 @@ class ExplorePage extends StatelessWidget { alignment: Alignment.center, children: [ ImageFiltered( - imageFilter: - ImageFilter.blur(sigmaX: 5, sigmaY: 5), + imageFilter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), child: Image.asset( AppConstants.modules[index].thumbnailPath, fit: BoxFit.cover, @@ -155,6 +113,106 @@ class ExplorePage extends StatelessWidget { childCount: AppConstants.modules.length, ), ), + GestureDetector( + onTap: () { + Navigator.pushNamed(context, '/quiz'); + }, + child: Container( + margin: const EdgeInsets.all(5.0), + padding: const EdgeInsets.all(8.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.black, width: 1.0), + borderRadius: BorderRadius.circular(8.0), + color: Colors.blueAccent, + ), + child: Row( + children: [ + SizedBox( + width: 50, + height: 50, + child: SvgPicture.asset('assets/explore/notebook.svg'), + ), + const SizedBox(width: 28.0), + const Text( + 'Quiz', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30.0, + fontFamily: 'Comic', + color: Colors.white, + ), + ), + ], + ), + ), + ), + GestureDetector( + onTap: () { + Navigator.pushNamed(context, AllRoutes.drawingboardRoute); + }, + child: Container( + margin: const EdgeInsets.all(5.0), + padding: const EdgeInsets.all(8.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.black, width: 1.0), + borderRadius: BorderRadius.circular(8.0), + color: Colors.greenAccent, + ), + child: Row( + children: [ + SizedBox( + width: 50, + height: 50, + child: SvgPicture.asset('assets/explore/drawing_board.svg'), + ), + const SizedBox(width: 28.0), + const Text( + 'Drawing Board', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30.0, + fontFamily: 'Comic', + color: Colors.white, + ), + ), + ], + ), + ), + ), + + // GestureDetector( + // onTap: () { + // Navigator.pushNamed(context, '/quiz'); + // }, + // child: Container( + // margin: const EdgeInsets.all(5.0), + // padding: const EdgeInsets.all(8.0), + // decoration: BoxDecoration( + // border: Border.all(color: Colors.black, width: 1.0), + // borderRadius: BorderRadius.circular(8.0), + // color: Colors.blueAccent, + // ), + // child: Row( + // children: [ + // SizedBox( + // width: 50, + // height: 50, + // child: SvgPicture.asset('assets/explore/notebook.svg'), + // ), + // const SizedBox(width: 28.0), + // const Text( + // 'Quiz', + // style: TextStyle( + // fontWeight: FontWeight.bold, + // fontSize: 30.0, + // fontFamily: 'Comic', + // color: Colors.white, + // ), + // ), + // ], + // ), + // ), + // ), ], ), ); diff --git a/lib/utils/routes.dart b/lib/utils/routes.dart index c64b442..143bdef 100644 --- a/lib/utils/routes.dart +++ b/lib/utils/routes.dart @@ -16,4 +16,5 @@ class AllRoutes { static const String seasonRoute = "/seasons"; static const String occupationRoute = '/occupations'; static const String fruitRoute = "/fruit"; + static const String drawingboardRoute = "/drawingboard.dart"; } From b1d255d9e0bf704fcec9b4e4afa3edd8869147db Mon Sep 17 00:00:00 2001 From: AsmitaMishra24 <146121869+AsmitaMishra24@users.noreply.github.com> Date: Tue, 28 May 2024 00:09:54 +0530 Subject: [PATCH 03/16] Added Drawing Board --- lib/pages/explore.dart | 324 +++++++++++++++++++++++++---------------- 1 file changed, 196 insertions(+), 128 deletions(-) diff --git a/lib/pages/explore.dart b/lib/pages/explore.dart index 42cdf60..c2a76f9 100644 --- a/lib/pages/explore.dart +++ b/lib/pages/explore.dart @@ -1,7 +1,8 @@ import 'dart:ui'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:learn/utils/constants.dart'; - +import '../utils/routes.dart'; import '../utils/const_dimensions.dart'; // Explore Page @@ -11,142 +12,209 @@ class ExplorePage extends StatelessWidget { @override Widget build(BuildContext context) { return SafeArea( - child: CustomScrollView( - slivers: [ - SliverAppBar( - title: Padding( - padding: const EdgeInsets.fromLTRB(0, 12, 16, 4), - child: Text( - "Explore", - style: Theme.of(context) - .textTheme - .headlineLarge! - .copyWith(fontWeight: FontWeight.bold, fontSize: 30.0), + child: CustomScrollView( + slivers: [ + SliverAppBar( + title: Padding( + padding: const EdgeInsets.fromLTRB(0, 12, 16, 4), + child: Text( + "Explore", + style: Theme.of(context) + .textTheme + .headlineLarge! + .copyWith(fontWeight: FontWeight.bold, fontSize: 30.0), + ), ), ), - ), - SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - return GestureDetector( - onTap: () => Navigator.push( - context, - AppConstants.modules[index].route, - ), - child: Container( - margin: const EdgeInsets.symmetric( - horizontal: 24, vertical: 12), - height: ConstantDimensions.heightExtraLarge * 4, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.2), - spreadRadius: 2, - blurRadius: 5, - offset: const Offset(0, 3), - ), - ], - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(16), - child: Stack( - fit: StackFit.expand, - alignment: Alignment.center, - children: [ - ImageFiltered( - imageFilter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), - child: Image.asset( - AppConstants.modules[index].thumbnailPath, - fit: BoxFit.cover, - ), + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + return GestureDetector( + onTap: () => Navigator.push( + context, + AppConstants.modules[index].route, + ), + child: Container( + margin: const EdgeInsets.symmetric( + horizontal: 24, vertical: 12), + height: ConstantDimensions.heightExtraLarge * 4, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.2), + spreadRadius: 2, + blurRadius: 5, + offset: const Offset(0, 3), ), - Positioned.fill( - child: Align( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AppConstants.modules[index].name, - style: Theme.of(context) - .textTheme - .headlineMedium! - .copyWith( - color: Colors.white, - fontWeight: FontWeight.bold, - shadows: [ - const Shadow( - color: Colors.black, - offset: Offset(2, 1), - blurRadius: 4, - ), - ], + ], + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(16), + child: Stack( + fit: StackFit.expand, + alignment: Alignment.center, + children: [ + ImageFiltered( + imageFilter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), + child: Image.asset( + AppConstants.modules[index].thumbnailPath, + fit: BoxFit.cover, + ), + ), + Positioned.fill( + child: Align( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + AppConstants.modules[index].name, + style: Theme.of(context) + .textTheme + .headlineMedium! + .copyWith( + color: Colors.white, + fontWeight: FontWeight.bold, + shadows: [ + const Shadow( + color: Colors.black, + offset: Offset(2, 1), + blurRadius: 4, + ), + ], + ), ), - ), - Text( - AppConstants.modules[index].description, - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith( - color: Colors.white, - fontWeight: FontWeight.bold, - shadows: [ - const Shadow( - color: Colors.black, - offset: Offset(2, 1), - blurRadius: 2, - ), - ], + Text( + AppConstants.modules[index].description, + style: Theme.of(context) + .textTheme + .bodyMedium! + .copyWith( + color: Colors.white, + fontWeight: FontWeight.bold, + shadows: [ + const Shadow( + color: Colors.black, + offset: Offset(2, 1), + blurRadius: 2, + ), + ], + ), ), - ), - ], + ], + ), ), ), - ), - ], - ), - )), - ); + ], + ), + )), + ); + }, + childCount: AppConstants.modules.length, + ), + ), + GestureDetector( + onTap: () { + Navigator.pushNamed(context, '/quiz'); + }, + child: Container( + margin: const EdgeInsets.all(5.0), + padding: const EdgeInsets.all(8.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.black, width: 1.0), + borderRadius: BorderRadius.circular(8.0), + color: Colors.blueAccent, + ), + child: Row( + children: [ + SizedBox( + width: 50, + height: 50, + child: SvgPicture.asset('assets/explore/notebook.svg'), + ), + const SizedBox(width: 28.0), + const Text( + 'Quiz', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30.0, + fontFamily: 'Comic', + color: Colors.white, + ), + ), + ], + ), + ), + ), + GestureDetector( + onTap: () { + Navigator.pushNamed(context, AllRoutes.drawingboardRoute); }, - childCount: AppConstants.modules.length, + child: Container( + margin: const EdgeInsets.all(5.0), + padding: const EdgeInsets.all(8.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.black, width: 1.0), + borderRadius: BorderRadius.circular(8.0), + color: Colors.greenAccent, + ), + child: Row( + children: [ + SizedBox( + width: 50, + height: 50, + child: SvgPicture.asset('assets/explore/drawing_board.svg'), + ), + const SizedBox(width: 28.0), + const Text( + 'Drawing Board', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30.0, + fontFamily: 'Comic', + color: Colors.white, + ), + ), + ], + ), + ), ), - ), - // GestureDetector( - // onTap: () { - // Navigator.pushNamed(context, '/quiz'); - // }, - // child: Container( - // margin: const EdgeInsets.all(5.0), - // padding: const EdgeInsets.all(8.0), - // decoration: BoxDecoration( - // border: Border.all(color: Colors.black, width: 1.0), - // borderRadius: BorderRadius.circular(8.0), - // color: Colors.blueAccent, - // ), - // child: Row( - // children: [ - // SizedBox( - // width: 50, - // height: 50, - // child: SvgPicture.asset('assets/explore/notebook.svg'), - // ), - // const SizedBox(width: 28.0), - // const Text( - // 'Quiz', - // style: TextStyle( - // fontWeight: FontWeight.bold, - // fontSize: 30.0, - // fontFamily: 'Comic', - // color: Colors.white, - // ), - // ), - // ], - // ), - // ), - // ), - ], - )); + // GestureDetector( + // onTap: () { + // Navigator.pushNamed(context, '/quiz'); + // }, + // child: Container( + // margin: const EdgeInsets.all(5.0), + // padding: const EdgeInsets.all(8.0), + // decoration: BoxDecoration( + // border: Border.all(color: Colors.black, width: 1.0), + // borderRadius: BorderRadius.circular(8.0), + // color: Colors.blueAccent, + // ), + // child: Row( + // children: [ + // SizedBox( + // width: 50, + // height: 50, + // child: SvgPicture.asset('assets/explore/notebook.svg'), + // ), + // const SizedBox(width: 28.0), + // const Text( + // 'Quiz', + // style: TextStyle( + // fontWeight: FontWeight.bold, + // fontSize: 30.0, + // fontFamily: 'Comic', + // color: Colors.white, + // ), + // ), + // ], + // ), + // ), + // ), + ], + ), + ); } } From a6df22895e5061fb54191537d22f7d583e282c2d Mon Sep 17 00:00:00 2001 From: AsmitaMishra24 <146121869+AsmitaMishra24@users.noreply.github.com> Date: Tue, 28 May 2024 00:12:33 +0530 Subject: [PATCH 04/16] Added Drawing Board --- lib/pages/explore.dart | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/lib/pages/explore.dart b/lib/pages/explore.dart index c2a76f9..0c47547 100644 --- a/lib/pages/explore.dart +++ b/lib/pages/explore.dart @@ -179,40 +179,6 @@ class ExplorePage extends StatelessWidget { ), ), ), - - // GestureDetector( - // onTap: () { - // Navigator.pushNamed(context, '/quiz'); - // }, - // child: Container( - // margin: const EdgeInsets.all(5.0), - // padding: const EdgeInsets.all(8.0), - // decoration: BoxDecoration( - // border: Border.all(color: Colors.black, width: 1.0), - // borderRadius: BorderRadius.circular(8.0), - // color: Colors.blueAccent, - // ), - // child: Row( - // children: [ - // SizedBox( - // width: 50, - // height: 50, - // child: SvgPicture.asset('assets/explore/notebook.svg'), - // ), - // const SizedBox(width: 28.0), - // const Text( - // 'Quiz', - // style: TextStyle( - // fontWeight: FontWeight.bold, - // fontSize: 30.0, - // fontFamily: 'Comic', - // color: Colors.white, - // ), - // ), - // ], - // ), - // ), - // ), ], ), ); From ebc4cb02fa1edc92a0c78ed5840ad83cf90db274 Mon Sep 17 00:00:00 2001 From: AsmitaMishra24 <146121869+AsmitaMishra24@users.noreply.github.com> Date: Wed, 29 May 2024 01:47:38 +0530 Subject: [PATCH 05/16] Added Drawing Board --- lib/utils/route/routes.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils/route/routes.dart b/lib/utils/route/routes.dart index e6c8de0..3ef276d 100644 --- a/lib/utils/route/routes.dart +++ b/lib/utils/route/routes.dart @@ -2,6 +2,7 @@ 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/drawingboard.dart'; import 'package:learn/pages/explore/quiz.dart'; import 'package:learn/pages/favorite.dart'; import 'package:learn/pages/fruits.dart'; @@ -55,6 +56,8 @@ class Routers { return slidePageRoute(OccupationPage()); case AllRoutesConstant.fruitRoute: return slidePageRoute(FruitsPage()); + case AllRoutesConstant.drawingboardRoute: + return slidePageRoute(const DrawingBoardPage()); case AllRoutesConstant.landing: return slidePageRoute(const LandingPage()); case AllRoutesConstant.mainhome: From fb74aad294e3bb436572c7b80b1278ef31232c2e Mon Sep 17 00:00:00 2001 From: AsmitaMishra24 <146121869+AsmitaMishra24@users.noreply.github.com> Date: Wed, 29 May 2024 02:42:25 +0530 Subject: [PATCH 06/16] Added Drawing Board --- lib/landing_page.dart | 2 +- lib/main.dart | 80 +------- lib/pages/explore.dart | 321 +++++++++++++++++---------------- lib/pages/explore/explore.dart | 184 ++++++++----------- lib/utils/route/routes.dart | 6 +- 5 files changed, 257 insertions(+), 336 deletions(-) diff --git a/lib/landing_page.dart b/lib/landing_page.dart index 09da76b..ba68fb0 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -86,7 +86,7 @@ class _LandingPageState extends State { onPressed: () { Navigator.popAndPushNamed( context, - AllRoutesConstant.mainhome, + AllRoutesConstant.mainhomeRoute, ); }, child: Text( diff --git a/lib/main.dart b/lib/main.dart index 571142b..d7f3bd0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,29 +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/landing_page.dart'; import 'package:learn/utils/route/routes.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/drawingboard.dart'; -import 'pages/explore/quiz.dart'; -import 'pages/home.dart'; -import 'landing_page.dart'; DateTime? currentBackPressTime; @@ -40,54 +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: 'Learn', - theme: theme, - darkTheme: darkTheme, - initialRoute: '/landing_page', - home: Scaffold( - body: const [ - MyHomePage(), - ExplorePage(), - FavoritePage(), - AboutPage(), - ][index], - bottomNavigationBar: const BottomNavBar(), - ), - onGenerateRoute: Routers.generateRoute, - 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(), - AllRoutes.drawingboardRoute: (context) => DrawingBoardPage(), - "/landing_page": (context) => const LandingPage(), - }, - ); - }, - ), - ), + return const MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Learn', + themeMode: ThemeMode.system, + home: LandingPage(), + onGenerateRoute: Routers.generateRoute, ); } -} +} \ No newline at end of file diff --git a/lib/pages/explore.dart b/lib/pages/explore.dart index 0c47547..2fb78ea 100644 --- a/lib/pages/explore.dart +++ b/lib/pages/explore.dart @@ -2,7 +2,8 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:learn/utils/constants.dart'; -import '../utils/routes.dart'; +import 'package:learn/utils/route/route_constant.dart'; + import '../utils/const_dimensions.dart'; // Explore Page @@ -12,175 +13,183 @@ class ExplorePage extends StatelessWidget { @override Widget build(BuildContext context) { return SafeArea( - child: CustomScrollView( - slivers: [ - SliverAppBar( - title: Padding( - padding: const EdgeInsets.fromLTRB(0, 12, 16, 4), - child: Text( - "Explore", - style: Theme.of(context) - .textTheme - .headlineLarge! - .copyWith(fontWeight: FontWeight.bold, fontSize: 30.0), + child: CustomScrollView( + slivers: [ + SliverAppBar( + title: Padding( + padding: const EdgeInsets.fromLTRB(0, 12, 16, 4), + child: Text( + "Explore", + style: Theme.of(context) + .textTheme + .headlineLarge! + .copyWith(fontWeight: FontWeight.bold, fontSize: 30.0), + ), ), ), - ), - SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - return GestureDetector( - onTap: () => Navigator.push( - context, - AppConstants.modules[index].route, - ), - child: Container( - margin: const EdgeInsets.symmetric( - horizontal: 24, vertical: 12), - height: ConstantDimensions.heightExtraLarge * 4, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.2), - spreadRadius: 2, - blurRadius: 5, - offset: const Offset(0, 3), - ), - ], - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(16), - child: Stack( - fit: StackFit.expand, - alignment: Alignment.center, - children: [ - ImageFiltered( - imageFilter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), - child: Image.asset( - AppConstants.modules[index].thumbnailPath, - fit: BoxFit.cover, - ), + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + return GestureDetector( + onTap: () => Navigator.push( + context, + AppConstants.modules[index].route, + ), + child: Container( + margin: const EdgeInsets.symmetric( + horizontal: 24, vertical: 12), + height: ConstantDimensions.heightExtraLarge * 4, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.2), + spreadRadius: 2, + blurRadius: 5, + offset: const Offset(0, 3), ), - Positioned.fill( - child: Align( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - AppConstants.modules[index].name, - style: Theme.of(context) - .textTheme - .headlineMedium! - .copyWith( - color: Colors.white, - fontWeight: FontWeight.bold, - shadows: [ - const Shadow( - color: Colors.black, - offset: Offset(2, 1), - blurRadius: 4, - ), - ], + ], + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(16), + child: Stack( + fit: StackFit.expand, + alignment: Alignment.center, + children: [ + ImageFiltered( + imageFilter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), + child: Image.asset( + AppConstants.modules[index].thumbnailPath, + fit: BoxFit.cover, + ), + ), + Positioned.fill( + child: Align( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + AppConstants.modules[index].name, + style: Theme.of(context) + .textTheme + .headlineMedium! + .copyWith( + color: Colors.white, + fontWeight: FontWeight.bold, + shadows: [ + const Shadow( + color: Colors.black, + offset: Offset(2, 1), + blurRadius: 4, + ), + ], + ), ), - ), - Text( - AppConstants.modules[index].description, - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith( - color: Colors.white, - fontWeight: FontWeight.bold, - shadows: [ - const Shadow( - color: Colors.black, - offset: Offset(2, 1), - blurRadius: 2, - ), - ], + Text( + AppConstants.modules[index].description, + style: Theme.of(context) + .textTheme + .bodyMedium! + .copyWith( + color: Colors.white, + fontWeight: FontWeight.bold, + shadows: [ + const Shadow( + color: Colors.black, + offset: Offset(2, 1), + blurRadius: 2, + ), + ], + ), ), - ), - ], + ], + ), ), ), - ), - ], + ], + ), ), - )), - ); - }, - childCount: AppConstants.modules.length, - ), - ), - GestureDetector( - onTap: () { - Navigator.pushNamed(context, '/quiz'); - }, - child: Container( - margin: const EdgeInsets.all(5.0), - padding: const EdgeInsets.all(8.0), - decoration: BoxDecoration( - border: Border.all(color: Colors.black, width: 1.0), - borderRadius: BorderRadius.circular(8.0), - color: Colors.blueAccent, - ), - child: Row( - children: [ - SizedBox( - width: 50, - height: 50, - child: SvgPicture.asset('assets/explore/notebook.svg'), - ), - const SizedBox(width: 28.0), - const Text( - 'Quiz', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 30.0, - fontFamily: 'Comic', - color: Colors.white, ), - ), - ], + ); + }, + childCount: AppConstants.modules.length, ), ), - ), - GestureDetector( - onTap: () { - Navigator.pushNamed(context, AllRoutes.drawingboardRoute); - }, - child: Container( - margin: const EdgeInsets.all(5.0), - padding: const EdgeInsets.all(8.0), - decoration: BoxDecoration( - border: Border.all(color: Colors.black, width: 1.0), - borderRadius: BorderRadius.circular(8.0), - color: Colors.greenAccent, - ), - child: Row( - children: [ - SizedBox( - width: 50, - height: 50, - child: SvgPicture.asset('assets/explore/drawing_board.svg'), - ), - const SizedBox(width: 28.0), - const Text( - 'Drawing Board', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 30.0, - fontFamily: 'Comic', - color: Colors.white, + + GestureDetector( + onTap: () { + Navigator.pushNamed( + context, + AllRoutesConstant.drawingboardRoute, + ); + }, + child: Container( + margin: const EdgeInsets.all(5.0), + padding: const EdgeInsets.all(8.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.black, width: 1.0), + borderRadius: BorderRadius.circular(8.0), + color: Colors.greenAccent, + ), + child: Row( + children: [ + SizedBox( + width: 50, + height: 50, + child: SvgPicture.asset( + 'assets/explore/drawing_board.svg', + ), ), - ), - ], + const SizedBox(width: 28.0), + const Text( + 'Drawing Board', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30.0, + fontFamily: 'Comic', + color: Colors.white, + ), + ), + ], + ), ), ), - ), - ], - ), + ], + ), ); } } + + // GestureDetector( + // onTap: () { + // Navigator.pushNamed(context, '/quiz'); + // }, + // child: Container( + // margin: const EdgeInsets.all(5.0), + // padding: const EdgeInsets.all(8.0), + // decoration: BoxDecoration( + // border: Border.all(color: Colors.black, width: 1.0), + // borderRadius: BorderRadius.circular(8.0), + // color: Colors.blueAccent, + // ), + // child: Row( + // children: [ + // SizedBox( + // width: 50, + // height: 50, + // child: SvgPicture.asset('assets/explore/notebook.svg'), + // ), + // const SizedBox(width: 28.0), + // const Text( + // 'Quiz', + // style: TextStyle( + // fontWeight: FontWeight.bold, + // fontSize: 30.0, + // fontFamily: 'Comic', + // color: Colors.white, + // ), + // ), + // ], + // ), + // ), + // ), diff --git a/lib/pages/explore/explore.dart b/lib/pages/explore/explore.dart index 63b4ae9..a2fbfdc 100644 --- a/lib/pages/explore/explore.dart +++ b/lib/pages/explore/explore.dart @@ -1,9 +1,11 @@ import 'dart:ui'; + import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:learn/utils/const_dimensions.dart'; import 'package:learn/utils/constants.dart'; -import '../../utils/routes.dart'; +import 'package:learn/utils/route/route_constant.dart'; + +import '../../utils/const_dimensions.dart'; // Explore Page class ExplorePage extends StatelessWidget { @@ -26,6 +28,79 @@ class ExplorePage extends StatelessWidget { ), ), ), + SliverList( + delegate: SliverChildListDelegate( + [ + GestureDetector( + onTap: () { + Navigator.pushNamed(context, '/quiz'); + }, + child: Container( + margin: const EdgeInsets.all(5.0), + padding: const EdgeInsets.all(8.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.black, width: 1.0), + borderRadius: BorderRadius.circular(8.0), + color: Colors.blueAccent, + ), + child: Row( + children: [ + SizedBox( + width: ConstantDimensions.widthExtraLarge, + height: ConstantDimensions.heightExtraLarge, + child: + SvgPicture.asset('assets/explore/notebook.svg'), + ), + const SizedBox(width: ConstantDimensions.widthMedium_Large), + const Text( + 'Quiz', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30.0, + fontFamily: 'Comic', + color: Colors.white, + ), + ), + ], + ), + ), + ), + GestureDetector( + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.drawingboardRoute); + }, + child: Container( + margin: const EdgeInsets.all(5.0), + padding: const EdgeInsets.all(8.0), + decoration: BoxDecoration( + border: Border.all(color: Colors.black, width: 1.0), + borderRadius: BorderRadius.circular(8.0), + color: Colors.greenAccent, + ), + child: Row( + children: [ + SizedBox( + width: ConstantDimensions.widthExtraLarge, + height: ConstantDimensions.heightExtraLarge, + child: SvgPicture.asset('assets/explore/drawing_board.svg'), + ), + const SizedBox(width: ConstantDimensions.widthMedium_Large), + const Text( + 'Drawing Board', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30.0, + fontFamily: 'Comic', + color: Colors.white, + ), + ), + ], + ), + ), + ), + ], + ), + ), SliverList( delegate: SliverChildBuilderDelegate( (context, index) { @@ -56,7 +131,8 @@ class ExplorePage extends StatelessWidget { alignment: Alignment.center, children: [ ImageFiltered( - imageFilter: ImageFilter.blur(sigmaX: 5, sigmaY: 5), + imageFilter: + ImageFilter.blur(sigmaX: 5, sigmaY: 5), child: Image.asset( AppConstants.modules[index].thumbnailPath, fit: BoxFit.cover, @@ -113,108 +189,8 @@ class ExplorePage extends StatelessWidget { childCount: AppConstants.modules.length, ), ), - GestureDetector( - onTap: () { - Navigator.pushNamed(context, '/quiz'); - }, - child: Container( - margin: const EdgeInsets.all(5.0), - padding: const EdgeInsets.all(8.0), - decoration: BoxDecoration( - border: Border.all(color: Colors.black, width: 1.0), - borderRadius: BorderRadius.circular(8.0), - color: Colors.blueAccent, - ), - child: Row( - children: [ - SizedBox( - width: 50, - height: 50, - child: SvgPicture.asset('assets/explore/notebook.svg'), - ), - const SizedBox(width: 28.0), - const Text( - 'Quiz', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 30.0, - fontFamily: 'Comic', - color: Colors.white, - ), - ), - ], - ), - ), - ), - GestureDetector( - onTap: () { - Navigator.pushNamed(context, AllRoutes.drawingboardRoute); - }, - child: Container( - margin: const EdgeInsets.all(5.0), - padding: const EdgeInsets.all(8.0), - decoration: BoxDecoration( - border: Border.all(color: Colors.black, width: 1.0), - borderRadius: BorderRadius.circular(8.0), - color: Colors.greenAccent, - ), - child: Row( - children: [ - SizedBox( - width: 50, - height: 50, - child: SvgPicture.asset('assets/explore/drawing_board.svg'), - ), - const SizedBox(width: 28.0), - const Text( - 'Drawing Board', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 30.0, - fontFamily: 'Comic', - color: Colors.white, - ), - ), - ], - ), - ), - ), - - // GestureDetector( - // onTap: () { - // Navigator.pushNamed(context, '/quiz'); - // }, - // child: Container( - // margin: const EdgeInsets.all(5.0), - // padding: const EdgeInsets.all(8.0), - // decoration: BoxDecoration( - // border: Border.all(color: Colors.black, width: 1.0), - // borderRadius: BorderRadius.circular(8.0), - // color: Colors.blueAccent, - // ), - // child: Row( - // children: [ - // SizedBox( - // width: 50, - // height: 50, - // child: SvgPicture.asset('assets/explore/notebook.svg'), - // ), - // const SizedBox(width: 28.0), - // const Text( - // 'Quiz', - // style: TextStyle( - // fontWeight: FontWeight.bold, - // fontSize: 30.0, - // fontFamily: 'Comic', - // color: Colors.white, - // ), - // ), - // ], - // ), - // ), - // ), ], ), ); } -} +} \ No newline at end of file diff --git a/lib/utils/route/routes.dart b/lib/utils/route/routes.dart index 3ef276d..4fb1872 100644 --- a/lib/utils/route/routes.dart +++ b/lib/utils/route/routes.dart @@ -58,9 +58,9 @@ class Routers { return slidePageRoute(FruitsPage()); case AllRoutesConstant.drawingboardRoute: return slidePageRoute(const DrawingBoardPage()); - case AllRoutesConstant.landing: + case AllRoutesConstant.landingRoute: return slidePageRoute(const LandingPage()); - case AllRoutesConstant.mainhome: + case AllRoutesConstant.mainhomeRoute: return slidePageRoute(MainHome()); default: return MaterialPageRoute( @@ -72,4 +72,4 @@ class Routers { ); } } -} +} \ No newline at end of file From c2313a6863f8f6b2ce7b970a19682b12e5d65625 Mon Sep 17 00:00:00 2001 From: Siva Ramana H V Date: Wed, 29 May 2024 18:04:52 +0530 Subject: [PATCH 07/16] About UI and content is addes --- lib/landing_page.dart | 130 +++++----- lib/pages/about.dart | 436 ++++++++++++++++++++++++-------- lib/pages/fruits.dart | 4 +- lib/pages/home.dart | 2 + lib/pages/modules/atoz.dart | 6 +- lib/pages/modules/colours.dart | 4 +- lib/pages/modules/flowers.dart | 4 +- lib/pages/modules/seasons.dart | 2 +- lib/utils/const_dimensions.dart | 3 +- pubspec.yaml | 2 +- 10 files changed, 408 insertions(+), 185 deletions(-) diff --git a/lib/landing_page.dart b/lib/landing_page.dart index 33be147..00e20d4 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -18,85 +18,83 @@ 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( - image: AssetImage("assets/images/studying.png"), - fit: BoxFit.contain - ), + 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 ), ), ), - - 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 - ), + ), + + const Padding(padding: EdgeInsets.only(top: 20)), + // + Center( + child: SizedBox( + child: Text( + "Learning Made Easy", + style: TextStyle( + fontWeight: FontWeight.w400, + fontSize: width/18 ), ), ), - - const Padding(padding: EdgeInsets.only(top: 30)), - - 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( - color: Colors.white, - fontSize: (width < height) ? width/19 : height/19 - ), + ), + + const Padding(padding: EdgeInsets.only(top: 30)), + + 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) => const MyHomePage())); + }, + child: Text("Get started", + style: TextStyle( + color: Colors.white, + fontSize: (width < height) ? width/19 : height/19 ), ), ), ), - - ], - ), + ), + + ], ), ), ), diff --git a/lib/pages/about.dart b/lib/pages/about.dart index 4221de2..980a34c 100644 --- a/lib/pages/about.dart +++ b/lib/pages/about.dart @@ -2,11 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:learn/utils/constants.dart'; import 'package:url_launcher/url_launcher.dart'; -import '../utils/const_dimensions.dart'; - class AboutPage extends StatelessWidget { const AboutPage({Key? key}) : super(key: key); @@ -16,143 +13,234 @@ class AboutPage extends StatelessWidget { appBar: AppBar( title: const Text( 'About', - style: TextStyle(fontWeight: FontWeight.bold), + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.white), ), + backgroundColor: Colors.deepPurple, ), body: SingleChildScrollView( child: Padding( - padding: const EdgeInsets.all(10.0), + padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text( - 'Learning app for kids', - style: TextStyle( - fontSize: 24.0, - fontWeight: FontWeight.bold, + const Center( + child: Text( + 'Learn', + style: TextStyle( + fontSize: 32.0, + fontWeight: FontWeight.bold, + color: Colors.deepPurple, + ), ), ), - - const SizedBox(height: 16.0), - const Text( - 'Version: 1.1.0', - style: TextStyle(fontSize: 18.0), + const SizedBox(height: 8.0), + const Center( + child: Text( + 'Learning app for kids', + style: TextStyle( + fontSize: 18.0, + color: Colors.grey, + ), + ), ), + const SizedBox(height: 32.0), + _buildSectionTitle(context, 'Version: 1.1.0'), const SizedBox(height: 8.0), - const Text( - 'Developed by: sapatevaibhav', - style: TextStyle(fontSize: 18.0), + _buildSectionContent(context, 'Developed by: sapatevaibhav'), + const SizedBox(height: 16.0), + _buildSectionTitle(context, 'Purpose of the App:'), + const SizedBox(height: 8.0), + _buildSectionContent( + context, + 'Learn is designed to provide a fun and interactive learning experience for kids. ' + 'Our mission is to make learning enjoyable and accessible, encouraging curiosity and discovery in young minds. ' + 'The app covers a wide range of topics to help children build a solid foundation of knowledge in a playful and engaging way.', ), const SizedBox(height: 16.0), - const Text( - 'Description:', - style: TextStyle( - fontSize: 20.0, - fontWeight: FontWeight.bold, - ), + _buildSectionTitle(context, 'Features:'), + const SizedBox(height: 8.0), + _buildFeature( + context, + 'A-Z Alphabets', + 'Learn the alphabets with examples and pronunciation guides, making it easier for kids to recognize and remember letters.', + ), + _buildFeature( + context, + 'Animals', + 'Discover animals, hear their sounds, and learn how to pronounce their names, fostering a love for nature and wildlife.', + ), + _buildFeature( + context, + 'Body Parts', + 'Learn about different body parts, how to pronounce them, and gain short information, promoting awareness of their own bodies.', ), + const SizedBox(height: 16.0), + _buildSectionTitle(context, 'Upcoming Features:'), const SizedBox(height: 8.0), - const Text( - AppConstants.description, - style: TextStyle(fontSize: 18.0), + _buildFeature( + context, + 'Birds', + 'Explore different birds and their voices, adding to the child’s knowledge about avian species.', ), - const SizedBox(height: 6.0), - const Text( - 'Source code:', - style: TextStyle( - fontSize: 20.0, - fontWeight: FontWeight.bold, - ), + _buildFeature( + context, + 'Solar System', + 'Gain knowledge about the solar system, sparking interest in space and astronomy.', ), + _buildFeature( + context, + 'Shapes', + 'Learn about different shapes and their properties, enhancing cognitive and visual-spatial skills.', + ), + const SizedBox(height: 16.0), + _buildSectionTitle(context, 'Source Code:'), + const SizedBox(height: 8.0), GestureDetector( onTap: () { - _launchURL(context, "https://github.com/VaibhavCodeClub/learn"); + _launchURL( + context, "https://github.com/VaibhavCodeClub/learn"); }, - child: SvgPicture.asset( - 'assets/images/git.svg', - width: 32.0, - height: 32.0, - color: Theme.of(context).brightness == Brightness.dark - ? Colors.white - : Colors.black, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/git.svg', + width: 32.0, + height: 32.0, + color: Theme.of(context).brightness == Brightness.dark + ? Colors.white + : Colors.black, + ), + const SizedBox(width: 8.0), + Text( + 'github.com/VaibhavCodeClub/learn', + style: TextStyle( + fontSize: 16.0, + color: Theme.of(context).brightness == Brightness.dark + ? Colors.white + : Colors.black, + decoration: TextDecoration.underline, + ), + ), + ], ), ), const SizedBox(height: 16.0), - const Text( - 'Connect:', - style: TextStyle( - fontSize: 20.0, - fontWeight: FontWeight.bold, - ), - ), - Row( - children: [ - GestureDetector( - onTap: () { - _launchURL(context, "https://github.com/sapatevaibhav"); - }, - child: SvgPicture.asset( - 'assets/images/github.svg', - width: ConstantDimensions.widthSmall_Medium * 2, - height: ConstantDimensions.heightSmall_Medium * 2, - color: Theme.of(context).brightness == Brightness.dark - ? Colors.white - : Colors.black, - ), - ), - const SizedBox(width: ConstantDimensions.widthSmall_Medium), - GestureDetector( - onTap: () { - _launchURL(context, "mailto:sapatevaibhav@duck.com"); - }, - child: SvgPicture.asset( - 'assets/images/email.svg', - width: ConstantDimensions.widthSmall_Medium * 2, - height: ConstantDimensions.heightSmall_Medium * 2, - color: Theme.of(context).brightness == Brightness.dark - ? Colors.white - : Colors.black , - ), - ), - const SizedBox(width: ConstantDimensions.widthSmall_Medium), - GestureDetector( - onTap: () { - _launchURL( - context, "https://linkedin.com/in/sapatevaibhav"); - }, - child: SvgPicture.asset( - 'assets/images/linkedin.svg', - width: ConstantDimensions.widthSmall_Medium * 2, - height: ConstantDimensions.heightSmall_Medium * 2, + _buildSectionTitle(context, 'Connect:'), + const SizedBox(height: 8.0), + Row( + children: [ + _buildIcon(context, 'https://github.com/sapatevaibhav', + 'assets/images/github.svg'), + const SizedBox(width: 16.0), + _buildIcon(context, 'mailto:sapatevaibhav@duck.com', + 'assets/images/email.svg'), + const SizedBox(width: 16.0), + GestureDetector( + onTap: () { + _launchURL( + context, 'https://linkedin.com/in/sapatevaibhav'); + }, + child: SvgPicture.asset( + 'assets/images/linkedin.svg', + width: 32.0, + height: 32.0, + ), ), - ), - const SizedBox(width: ConstantDimensions.widthSmall_Medium), - GestureDetector( - onTap: () { - _launchURL(context, "https://instagram.com/v.d.r.sapate"); + const SizedBox(width: 16.0), + _buildIcon(context, 'https://instagram.com/v.d.r.sapate', + 'assets/images/instagram.svg'), + ], + ), + const SizedBox(height: 16.0), + Center( + child: ElevatedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const LearnMorePage(), + ), + ); }, - child: SvgPicture.asset( - 'assets/images/instagram.svg', - width: ConstantDimensions.widthSmall_Medium * 2, - height: ConstantDimensions.heightSmall_Medium * 2, - color: Theme.of(context).brightness == Brightness.dark - ? Colors.white - : Colors.black, + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, + backgroundColor: Colors.deepPurple, + padding: const EdgeInsets.symmetric( + horizontal: 24, vertical: 12), + textStyle: const TextStyle(fontSize: 18.0), ), + child: const Text('Learn More'), ), - - ] - ) - ], - ), + ], ), - ), + ), + ); + } - ); + Widget _buildSectionTitle(BuildContext context, String title) { + return Text( + title, + style: const TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + color: Colors.deepPurple, + ), + ); + } + Widget _buildSectionContent(BuildContext context, String content) { + return Text( + content, + style: TextStyle( + fontSize: 16.0, + color: Theme.of(context).textTheme.bodyLarge!.color, + ), + ); + } + + Widget _buildFeature(BuildContext context, String title, String description) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: const TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.bold, + color: Colors.deepPurple, + ), + ), + const SizedBox(height: 4.0), + Text( + description, + style: TextStyle( + fontSize: 16.0, + color: Theme.of(context).textTheme.bodyLarge!.color, + ), + ), + ], + ), + ); + } + Widget _buildIcon(BuildContext context, String url, String assetPath) { + return GestureDetector( + onTap: () { + _launchURL(context, url); + }, + child: SvgPicture.asset( + assetPath, + width: 32.0, + height: 32.0, + color: Theme.of(context).brightness == Brightness.dark + ? Colors.white + : Colors.black, + ), + ); } void _launchURL(BuildContext context, String url) async { @@ -163,3 +251,137 @@ class AboutPage extends StatelessWidget { } } } + +class LearnMorePage extends StatelessWidget { + const LearnMorePage({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text( + 'Learn More', + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.white), + ), + backgroundColor: Colors.deepPurple, + ), + body: SingleChildScrollView( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _buildSectionTitle(context, 'Detailed Features:'), + const SizedBox(height: 8.0), + _buildFeature( + context, + 'A-Z Alphabets', + 'Each letter of the alphabet is accompanied by an example image and pronunciation guide. Children can interact with the letters to hear how they sound, helping them to learn the alphabet in a fun and engaging way.', + ), + _buildFeature( + context, + 'Animals', + 'The animals section introduces children to various animals, providing sounds and fun facts about each one. This feature helps children to develop a love for nature and learn more about the animal kingdom.', + ), + _buildFeature( + context, + 'Body Parts', + 'This feature includes a diagram of the human body with clickable parts that provide information and pronunciation. It helps children to learn about their own bodies and understand the function of each part.', + ), + const SizedBox(height: 16.0), + _buildSectionTitle(context, 'Upcoming Features:'), + const SizedBox(height: 8.0), + _buildFeature( + context, + 'Birds', + 'The upcoming birds section will introduce various birds and their calls, helping children to recognize and learn more about avian species.', + ), + _buildFeature( + context, + 'Solar System', + 'The solar system feature will teach children about the planets and other celestial bodies, fostering an interest in space and astronomy.', + ), + _buildFeature( + context, + 'Shapes', + 'Children will learn about different shapes and their properties, which helps in developing cognitive and visual-spatial skills.', + ), + const SizedBox(height: 16.0), + _buildSectionTitle(context, 'User Guide:'), + const SizedBox(height: 8.0), + _buildSectionContent( + context, + 'Navigate through the app using the bottom navigation bar. Each section is designed to be interactive and user-friendly. Parents can help guide their children through each feature and use the app as a supplementary learning tool.', + ), + const SizedBox(height: 16.0), + _buildSectionTitle(context, 'FAQ:'), + const SizedBox(height: 8.0), + _buildSectionContent( + context, + 'Q: How do I use the app?\n' + 'A: Simply navigate through the sections using the bottom navigation bar. Each section is designed to be intuitive and easy to use.\n\n' + 'Q: Is the app free?\n' + 'A: Yes, the app is free to use. Some additional features may be available for purchase in the future.\n\n' + 'Q: How can I provide feedback?\n' + 'A: You can provide feedback through the contact options available in the About section of the app.', + ), + const SizedBox(height: 16.0), + _buildSectionTitle(context, 'Feedback and Contact Information:'), + const SizedBox(height: 8.0), + _buildSectionContent( + context, + 'We value your feedback! If you have any suggestions or issues, please contact us at sapatevaibhav@duck.com or through our social media channels.', + ), + ], + ), + ), + ); + } + + Widget _buildSectionTitle(BuildContext context, String title) { + return Text( + title, + style: const TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + color: Colors.deepPurple, + ), + ); + } + + Widget _buildSectionContent(BuildContext context, String content) { + return Text( + content, + style: TextStyle( + fontSize: 16.0, + color: Theme.of(context).textTheme.bodyLarge!.color, + ), + ); + } + + Widget _buildFeature(BuildContext context, String title, String description) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: const TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.bold, + color: Colors.deepPurple, + ), + ), + const SizedBox(height: 4.0), + Text( + description, + style: TextStyle( + fontSize: 16.0, + color: Theme.of(context).textTheme.bodyLarge!.color, + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/fruits.dart b/lib/pages/fruits.dart index 9954f88..78ca834 100644 --- a/lib/pages/fruits.dart +++ b/lib/pages/fruits.dart @@ -115,7 +115,7 @@ class _FruitsPageState extends State { ), ElevatedButton( style: ButtonStyle( - fixedSize: MaterialStateProperty.all( + fixedSize: WidgetStateProperty.all( Size(MediaQuery.of(context).size.width * .3, 50))), onPressed: () { if (AppConstants.Fruits[_currentIndex].isfruit == true) { @@ -131,7 +131,7 @@ class _FruitsPageState extends State { ), ElevatedButton( style: ButtonStyle( - fixedSize: MaterialStateProperty.all( + fixedSize: WidgetStateProperty.all( Size(MediaQuery.of(context).size.width * .3, 50))), onPressed: () { if (AppConstants.Fruits[_currentIndex].isfruit == false) { diff --git a/lib/pages/home.dart b/lib/pages/home.dart index bf0100a..e33e024 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:adaptive_theme/adaptive_theme.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; diff --git a/lib/pages/modules/atoz.dart b/lib/pages/modules/atoz.dart index 219cc01..1236de5 100644 --- a/lib/pages/modules/atoz.dart +++ b/lib/pages/modules/atoz.dart @@ -219,7 +219,7 @@ class _PopupDialogState extends State<_PopupDialog> { const SizedBox(height: ConstantDimensions.heightMedium), ElevatedButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( const Color.fromARGB(216, 233, 101, 92), ), ), @@ -270,8 +270,8 @@ class _AtoZState extends State { child: ElevatedButton( style: ButtonStyle( backgroundColor: isTimerEnabled - ? MaterialStateProperty.all(Colors.green) - : MaterialStateProperty.all(Colors.red), + ? WidgetStateProperty.all(Colors.green) + : WidgetStateProperty.all(Colors.red), ), onPressed: () { setState(() { diff --git a/lib/pages/modules/colours.dart b/lib/pages/modules/colours.dart index 5c407ab..a0f068d 100644 --- a/lib/pages/modules/colours.dart +++ b/lib/pages/modules/colours.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_tts/flutter_tts.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:learn/utils/assets_path.dart'; -import '../../utils/const_dimensions.dart'; +// import '../../utils/const_dimensions.dart'; import 'package:learn/models/colours_model.dart'; class ColoursPage extends StatefulWidget { @@ -135,7 +135,7 @@ class _ColoursPageState extends State { children: [ GestureDetector( onTap: _navigateToNextColour, - child: Container( + child: SizedBox( width: double.infinity, height: 300, child: SvgPicture.asset( diff --git a/lib/pages/modules/flowers.dart b/lib/pages/modules/flowers.dart index 075f0d2..f5f51a7 100644 --- a/lib/pages/modules/flowers.dart +++ b/lib/pages/modules/flowers.dart @@ -4,7 +4,7 @@ import 'package:flutter_tts/flutter_tts.dart'; import 'package:learn/models/flower_model.dart'; import 'package:learn/utils/assets_path.dart'; -import '../../utils/const_dimensions.dart'; +// import '../../utils/const_dimensions.dart'; class FlowerPage extends StatefulWidget { const FlowerPage({super.key}); @@ -119,7 +119,7 @@ class _FlowerPageState extends State { children: [ GestureDetector( onTap: _navigateToNextFlower, - child: Container( + child: SizedBox( width: double.infinity, height: 300, child: SvgPicture.asset( diff --git a/lib/pages/modules/seasons.dart b/lib/pages/modules/seasons.dart index 5f4c9c4..cd19bd9 100644 --- a/lib/pages/modules/seasons.dart +++ b/lib/pages/modules/seasons.dart @@ -136,7 +136,7 @@ class _SeasonPopupState extends State { ), ElevatedButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all(Colors.red), + backgroundColor: WidgetStateProperty.all(Colors.red), ), onPressed: () { Navigator.of(context).pop(); diff --git a/lib/utils/const_dimensions.dart b/lib/utils/const_dimensions.dart index bb30064..8abac52 100644 --- a/lib/utils/const_dimensions.dart +++ b/lib/utils/const_dimensions.dart @@ -1,3 +1,5 @@ +// ignore_for_file: constant_identifier_names + class ConstantDimensions { static const double heightExtraSmall = 6; static const double heightSmall = 10; @@ -15,7 +17,6 @@ class ConstantDimensions { static const double widthLarge = 30; static const double widthExtraLarge = 50; - static const double heightSmallImage = 325; static const double heightBigImage = 350; diff --git a/pubspec.yaml b/pubspec.yaml index a284a1a..b5f6453 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -42,7 +42,7 @@ dependencies: card_swiper: ^3.0.1 flutter_card_swiper: ^7.0.0 adaptive_theme: ^3.6.0 - fluttertoast: ^8.2.5 + fluttertoast: 8.0.9 google_nav_bar: ^5.0.6 flutter_bloc: ^8.1.5 animated_text_kit: ^4.2.2 From 096b03a2b43164a4d746c45c28eeee89e14af2f5 Mon Sep 17 00:00:00 2001 From: Maheen Ilyas Date: Thu, 30 May 2024 13:01:58 +0300 Subject: [PATCH 08/16] Replaced MaterialStateProperty to WidgetStateProperty --- lib/pages/fruits.dart | 4 ++-- lib/pages/main_home.dart | 13 ++++++++----- lib/pages/modules/atoz.dart | 6 +++--- lib/pages/modules/seasons.dart | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/pages/fruits.dart b/lib/pages/fruits.dart index 9954f88..78ca834 100644 --- a/lib/pages/fruits.dart +++ b/lib/pages/fruits.dart @@ -115,7 +115,7 @@ class _FruitsPageState extends State { ), ElevatedButton( style: ButtonStyle( - fixedSize: MaterialStateProperty.all( + fixedSize: WidgetStateProperty.all( Size(MediaQuery.of(context).size.width * .3, 50))), onPressed: () { if (AppConstants.Fruits[_currentIndex].isfruit == true) { @@ -131,7 +131,7 @@ class _FruitsPageState extends State { ), ElevatedButton( style: ButtonStyle( - fixedSize: MaterialStateProperty.all( + fixedSize: WidgetStateProperty.all( Size(MediaQuery.of(context).size.width * .3, 50))), onPressed: () { if (AppConstants.Fruits[_currentIndex].isfruit == false) { diff --git a/lib/pages/main_home.dart b/lib/pages/main_home.dart index 3c38b3d..f9bc566 100644 --- a/lib/pages/main_home.dart +++ b/lib/pages/main_home.dart @@ -12,6 +12,7 @@ import 'package:learn/widgets/navbar/navbar.dart'; class MainHome extends StatefulWidget { final AdaptiveThemeMode? savedThemeMode; + const MainHome({ super.key, this.savedThemeMode, @@ -22,7 +23,7 @@ class MainHome extends StatefulWidget { } class _MainHomeState extends State { - Future _onBackPressed() { + bool _onBackPressed(bool canPop) { DateTime now = DateTime.now(); if (currentBackPressTime == null || now.difference(currentBackPressTime!) > const Duration(seconds: 2)) { @@ -32,15 +33,17 @@ class _MainHomeState extends State { toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM, ); - return Future.value(false); + canPop = false; + } else { + canPop = true; } - return Future.value(true); + return canPop; } @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: _onBackPressed, + return PopScope( + onPopInvoked: _onBackPressed, child: AdaptiveTheme( light: ThemeData.light(), dark: ThemeData.dark(), diff --git a/lib/pages/modules/atoz.dart b/lib/pages/modules/atoz.dart index 219cc01..1236de5 100644 --- a/lib/pages/modules/atoz.dart +++ b/lib/pages/modules/atoz.dart @@ -219,7 +219,7 @@ class _PopupDialogState extends State<_PopupDialog> { const SizedBox(height: ConstantDimensions.heightMedium), ElevatedButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( const Color.fromARGB(216, 233, 101, 92), ), ), @@ -270,8 +270,8 @@ class _AtoZState extends State { child: ElevatedButton( style: ButtonStyle( backgroundColor: isTimerEnabled - ? MaterialStateProperty.all(Colors.green) - : MaterialStateProperty.all(Colors.red), + ? WidgetStateProperty.all(Colors.green) + : WidgetStateProperty.all(Colors.red), ), onPressed: () { setState(() { diff --git a/lib/pages/modules/seasons.dart b/lib/pages/modules/seasons.dart index 5f4c9c4..cd19bd9 100644 --- a/lib/pages/modules/seasons.dart +++ b/lib/pages/modules/seasons.dart @@ -136,7 +136,7 @@ class _SeasonPopupState extends State { ), ElevatedButton( style: ButtonStyle( - backgroundColor: MaterialStateProperty.all(Colors.red), + backgroundColor: WidgetStateProperty.all(Colors.red), ), onPressed: () { Navigator.of(context).pop(); From fb56e624940b1e8a4c3b236af971beef0e141582 Mon Sep 17 00:00:00 2001 From: Sapate Vaibhav Date: Fri, 31 May 2024 11:27:24 +0530 Subject: [PATCH 09/16] Update about.dart --- lib/pages/about.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pages/about.dart b/lib/pages/about.dart index 980a34c..294bbfe 100644 --- a/lib/pages/about.dart +++ b/lib/pages/about.dart @@ -287,9 +287,7 @@ class LearnMorePage extends StatelessWidget { 'Body Parts', 'This feature includes a diagram of the human body with clickable parts that provide information and pronunciation. It helps children to learn about their own bodies and understand the function of each part.', ), - const SizedBox(height: 16.0), - _buildSectionTitle(context, 'Upcoming Features:'), - const SizedBox(height: 8.0), + _buildFeature( context, 'Birds', @@ -299,7 +297,9 @@ class LearnMorePage extends StatelessWidget { context, 'Solar System', 'The solar system feature will teach children about the planets and other celestial bodies, fostering an interest in space and astronomy.', - ), + ),const SizedBox(height: 16.0), + _buildSectionTitle(context, 'Upcoming Features:'), + const SizedBox(height: 8.0), _buildFeature( context, 'Shapes', @@ -320,7 +320,7 @@ class LearnMorePage extends StatelessWidget { 'Q: How do I use the app?\n' 'A: Simply navigate through the sections using the bottom navigation bar. Each section is designed to be intuitive and easy to use.\n\n' 'Q: Is the app free?\n' - 'A: Yes, the app is free to use. Some additional features may be available for purchase in the future.\n\n' + 'A: Yes, the app is free to use.\n\n' 'Q: How can I provide feedback?\n' 'A: You can provide feedback through the contact options available in the About section of the app.', ), From f1c9f6d6b9a0ebacb3cf2cbb25e19476a7d60063 Mon Sep 17 00:00:00 2001 From: Sapate Vaibhav Date: Fri, 31 May 2024 11:30:38 +0530 Subject: [PATCH 10/16] Update about.dart --- lib/pages/about.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pages/about.dart b/lib/pages/about.dart index 294bbfe..b3c485f 100644 --- a/lib/pages/about.dart +++ b/lib/pages/about.dart @@ -74,9 +74,7 @@ class AboutPage extends StatelessWidget { 'Body Parts', 'Learn about different body parts, how to pronounce them, and gain short information, promoting awareness of their own bodies.', ), - const SizedBox(height: 16.0), - _buildSectionTitle(context, 'Upcoming Features:'), - const SizedBox(height: 8.0), + _buildFeature( context, 'Birds', @@ -86,7 +84,9 @@ class AboutPage extends StatelessWidget { context, 'Solar System', 'Gain knowledge about the solar system, sparking interest in space and astronomy.', - ), + ),const SizedBox(height: 16.0), + _buildSectionTitle(context, 'Upcoming Features:'), + const SizedBox(height: 8.0), _buildFeature( context, 'Shapes', From e503bacc7d06391bc8cd6780e20f232daef1c3a5 Mon Sep 17 00:00:00 2001 From: DS-1090 <126580400+DS-1090@users.noreply.github.com> Date: Fri, 31 May 2024 13:18:23 +0530 Subject: [PATCH 11/16] Add files via upload --- lib/pages/modules/flowers.dart | 362 +++++++++++++++++---------------- 1 file changed, 183 insertions(+), 179 deletions(-) diff --git a/lib/pages/modules/flowers.dart b/lib/pages/modules/flowers.dart index f5f51a7..db1ae9a 100644 --- a/lib/pages/modules/flowers.dart +++ b/lib/pages/modules/flowers.dart @@ -1,179 +1,183 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:flutter_tts/flutter_tts.dart'; -import 'package:learn/models/flower_model.dart'; -import 'package:learn/utils/assets_path.dart'; - -// import '../../utils/const_dimensions.dart'; - -class FlowerPage extends StatefulWidget { - const FlowerPage({super.key}); - - @override - State createState() => _FlowerPageState(); -} - -class _FlowerPageState extends State { - final List flowers = [ - Flower( - name: "Rose", - resource: AssetsPath.getFlowerImage(Flowers.rose), - background: Colors.redAccent), - Flower( - name: "Sunflower", - resource: AssetsPath.getFlowerImage(Flowers.sunflower), - background: Colors.yellowAccent), - Flower( - name: "Lily", - resource: AssetsPath.getFlowerImage(Flowers.lily), - background: Colors.greenAccent), - Flower( - name: "Marigold", - resource: AssetsPath.getFlowerImage(Flowers.marigold), - background: Colors.yellow), - Flower( - name: "Carnation", - resource: AssetsPath.getFlowerImage(Flowers.carnation), - background: Colors.redAccent), - Flower( - name: "Daffodil", - resource: AssetsPath.getFlowerImage(Flowers.daffodil), - background: Colors.purpleAccent), - Flower( - name: "Daisy", - resource: AssetsPath.getFlowerImage(Flowers.daisy), - background: Colors.green), - Flower( - name: "Poppy", - resource: AssetsPath.getFlowerImage(Flowers.poppy), - background: Colors.redAccent), - Flower( - name: "Tulip", - resource: AssetsPath.getFlowerImage(Flowers.tulip), - background: Colors.pink), - Flower( - name: "Lavender", - resource: AssetsPath.getFlowerImage(Flowers.lavender), - background: Colors.purple), - Flower( - name: "Hibiscus", - resource: AssetsPath.getFlowerImage(Flowers.hibiscus), - background: Colors.red), - ]; - - final FlutterTts flutterTts = FlutterTts(); - int currentIndex = 0; - - void _navigateToNextFlower() { - setState(() { - currentIndex = (currentIndex + 1) % flowers.length; - }); - } - - void _navigateToPreviousFlower() { - setState(() { - currentIndex = (currentIndex - 1 + flowers.length) % flowers.length; - }); - } - - Future readName(String name) async { - await flutterTts.setVolume(1.0); - await flutterTts.setLanguage("EN-IN"); - await flutterTts.setPitch(1.0); - await flutterTts.speak(name); - } - - @override - Widget build(BuildContext context) { - Flower flower = flowers[currentIndex]; - return Scaffold( - appBar: AppBar( - title: const Text( - 'Flowers', - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 30, - ), - ), - ), - backgroundColor: flower.background, - body: SingleChildScrollView( - child: Center( - child: Container( - padding: const EdgeInsets.all(20), - constraints: const BoxConstraints(maxWidth: 400, maxHeight: 700), - decoration: BoxDecoration( - color: Colors.white.withOpacity(0.7), - borderRadius: BorderRadius.circular(7.0), - boxShadow: [ - BoxShadow( - color: Colors.white.withOpacity(0.2), - spreadRadius: 2, - blurRadius: 5, - offset: const Offset(0, 3), - ), - ], - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - onTap: _navigateToNextFlower, - child: SizedBox( - width: double.infinity, - height: 300, - child: SvgPicture.asset( - flower.resource, - fit: BoxFit.contain, - ), - ), - ), - const SizedBox(height: 20), - Text( - flower.name, - style: const TextStyle( - fontWeight: FontWeight.bold, - fontSize: 60, - fontFamily: 'Comic', - ), - ), - const SizedBox(height: 20), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - IconButton( - onPressed: _navigateToPreviousFlower, - icon: const Icon( - Icons.arrow_back, - size: 30, - ), - ), - const SizedBox(width: 20), - IconButton.outlined( - highlightColor: Colors.amber, - onPressed: () { - readName(flower.name); - }, - icon: const Icon( - Icons.volume_up_outlined, - size: 40, - ), - ), - const SizedBox(width: 20), - IconButton( - onPressed: _navigateToNextFlower, - icon: const Icon( - Icons.arrow_forward, - size: 30, - ), - ) - ], - ), - ], - ), - ), - ), - ), - ); - } -} +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:flutter_tts/flutter_tts.dart'; +import 'package:learn/models/flower_model.dart'; +import 'package:learn/utils/assets_path.dart'; + +// import '../../utils/const_dimensions.dart'; + +class FlowerPage extends StatefulWidget { + const FlowerPage({super.key}); + + @override + State createState() => _FlowerPageState(); +} + +class _FlowerPageState extends State { + final List flowers = [ + Flower( + name: "Rose", + resource: AssetsPath.getFlowerImage(Flowers.rose), + background: Colors.red.shade600), + Flower( + name: "Sunflower", + resource: AssetsPath.getFlowerImage(Flowers.sunflower), + background: Colors.yellow.shade700), + Flower( + name: "Lily", + resource: AssetsPath.getFlowerImage(Flowers.lily), + background: Colors.green.shade300), + Flower( + name: "Marigold", + resource: AssetsPath.getFlowerImage(Flowers.marigold), + background: Colors.orange.shade600), + Flower( + name: "Dandelion", + resource: AssetsPath.getFlowerImage(Flowers.dandelion), + background: Colors.green.shade600), + Flower( + name: "Lotus", + resource: AssetsPath.getFlowerImage(Flowers.lotus), + background: Colors.pink.shade300), + Flower( + name: "Daisy", + resource: AssetsPath.getFlowerImage(Flowers.daisy), + background: Colors.brown.shade400), + Flower( + name: "Jasmine", + resource: AssetsPath.getFlowerImage(Flowers.jasmine), + background: Colors.green.shade600), + Flower( + name: "Tulip", + resource: AssetsPath.getFlowerImage(Flowers.tulip), + background: Colors.pink.shade400), + Flower( + name: "Lavender", + resource: AssetsPath.getFlowerImage(Flowers.lavender), + background: Colors.purple.shade600), + Flower( + name: "Hibiscus", + resource: AssetsPath.getFlowerImage(Flowers.hibiscus), + background: Colors.pink.shade400), + ]; + + final FlutterTts flutterTts = FlutterTts(); + int currentIndex = 0; + + void _navigateToNextFlower() { + setState(() { + currentIndex = (currentIndex + 1) % flowers.length; + }); + } + + void _navigateToPreviousFlower() { + setState(() { + currentIndex = (currentIndex - 1 + flowers.length) % flowers.length; + }); + } + + Future readName(String name) async { + await flutterTts.setVolume(1.0); + await flutterTts.setLanguage("EN-IN"); + await flutterTts.setPitch(1.0); + await flutterTts.speak(name); + } + + @override + Widget build(BuildContext context) { + Flower flower = flowers[currentIndex]; + return Scaffold( + appBar: AppBar( + title: const Text( + 'Flowers', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 30, + ), + ), + ), + backgroundColor: flower.background, + + body: Center( + child: SingleChildScrollView( + child: Center( + child: Container( + padding: const EdgeInsets.all(20), + constraints: const BoxConstraints(maxWidth: 400, maxHeight: 700), + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.7), + borderRadius: BorderRadius.circular(7.0), + boxShadow: [ + BoxShadow( + color: Colors.white.withOpacity(0.2), + spreadRadius: 2, + blurRadius: 5, + offset: const Offset(0, 3), + ), + ], + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GestureDetector( + onTap: _navigateToNextFlower, + child: Container( + width: double.infinity, + height: 300, + child: SvgPicture.asset( + flower.resource, + fit: BoxFit.contain, + ), + ), + ), + const SizedBox(height: 20), + Text( + flower.name, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 60, + fontFamily: 'Comic', + color: flower.background, + ), + ), + const SizedBox(height: 20), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + onPressed: _navigateToPreviousFlower, + icon: const Icon( + Icons.arrow_back, + size: 30, + ), + ), + const SizedBox(width: 20), + IconButton.outlined( + highlightColor: Colors.amber, + onPressed: () { + readName(flower.name); + }, + icon: const Icon( + Icons.volume_up_outlined, + size: 40, + ), + ), + const SizedBox(width: 20), + IconButton( + onPressed: _navigateToNextFlower, + icon: const Icon( + Icons.arrow_forward, + size: 30, + ), + ) + ], + ), + ], + ), + ), + ), + ), + ), + ); + } +} From 5eaf1db60d8cd14321eaf687b38d4a76a302bc7b Mon Sep 17 00:00:00 2001 From: DS-1090 <126580400+DS-1090@users.noreply.github.com> Date: Fri, 31 May 2024 13:22:50 +0530 Subject: [PATCH 12/16] Updated Flowers Page - Resolved image lag issue - Enhanced UI to make it more adaptive to theme changes - Added commonly used flowers From 8727afa277b45372c97dcea4ae6d8ee7afc9a924 Mon Sep 17 00:00:00 2001 From: DS-1090 <126580400+DS-1090@users.noreply.github.com> Date: Fri, 31 May 2024 13:24:52 +0530 Subject: [PATCH 13/16] Added updated flower images --- assets/images/flowers/daisy.svg | 57 +- assets/images/flowers/dandelion.svg | 11 + assets/images/flowers/flower-icon.svg | 44 +- assets/images/flowers/hibiscus.svg | 11 +- assets/images/flowers/jasmine.svg | 10 + assets/images/flowers/lavender.svg | 3332 +------------------------ assets/images/flowers/lily.svg | 55 +- assets/images/flowers/lotus.svg | 10 + assets/images/flowers/marigold.svg | 12 +- assets/images/flowers/rose.svg | 12 +- assets/images/flowers/sunflower.svg | 3 +- assets/images/flowers/tulip.svg | 11 +- 12 files changed, 217 insertions(+), 3351 deletions(-) create mode 100644 assets/images/flowers/dandelion.svg create mode 100644 assets/images/flowers/jasmine.svg create mode 100644 assets/images/flowers/lotus.svg diff --git a/assets/images/flowers/daisy.svg b/assets/images/flowers/daisy.svg index 6103b4d..a6f8d04 100644 --- a/assets/images/flowers/daisy.svg +++ b/assets/images/flowers/daisy.svg @@ -1 +1,56 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/dandelion.svg b/assets/images/flowers/dandelion.svg new file mode 100644 index 0000000..992111d --- /dev/null +++ b/assets/images/flowers/dandelion.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/flower-icon.svg b/assets/images/flowers/flower-icon.svg index 16574cc..c8790b0 100644 --- a/assets/images/flowers/flower-icon.svg +++ b/assets/images/flowers/flower-icon.svg @@ -1,23 +1,23 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/hibiscus.svg b/assets/images/flowers/hibiscus.svg index 374b693..e10ddf0 100644 --- a/assets/images/flowers/hibiscus.svg +++ b/assets/images/flowers/hibiscus.svg @@ -1 +1,10 @@ - \ No newline at end of file + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/jasmine.svg b/assets/images/flowers/jasmine.svg new file mode 100644 index 0000000..fb78e3f --- /dev/null +++ b/assets/images/flowers/jasmine.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/lavender.svg b/assets/images/flowers/lavender.svg index 5b8b037..1ec5e80 100644 --- a/assets/images/flowers/lavender.svg +++ b/assets/images/flowers/lavender.svg @@ -1,3322 +1,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/lily.svg b/assets/images/flowers/lily.svg index faa1785..9bce177 100644 --- a/assets/images/flowers/lily.svg +++ b/assets/images/flowers/lily.svg @@ -1 +1,54 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/lotus.svg b/assets/images/flowers/lotus.svg new file mode 100644 index 0000000..b0cc6be --- /dev/null +++ b/assets/images/flowers/lotus.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/marigold.svg b/assets/images/flowers/marigold.svg index ad4fa2c..0c1cc01 100644 --- a/assets/images/flowers/marigold.svg +++ b/assets/images/flowers/marigold.svg @@ -1 +1,11 @@ - \ No newline at end of file + + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/rose.svg b/assets/images/flowers/rose.svg index 55172e3..2ea1228 100644 --- a/assets/images/flowers/rose.svg +++ b/assets/images/flowers/rose.svg @@ -1 +1,11 @@ - \ No newline at end of file + + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/flowers/sunflower.svg b/assets/images/flowers/sunflower.svg index b178b76..e4f44ea 100644 --- a/assets/images/flowers/sunflower.svg +++ b/assets/images/flowers/sunflower.svg @@ -1 +1,2 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/assets/images/flowers/tulip.svg b/assets/images/flowers/tulip.svg index f754c50..6d910c1 100644 --- a/assets/images/flowers/tulip.svg +++ b/assets/images/flowers/tulip.svg @@ -1 +1,10 @@ - \ No newline at end of file + + + + + + + + + + \ No newline at end of file From f847a4bfa098bc859c5e3ac137db820d28a95134 Mon Sep 17 00:00:00 2001 From: DS-1090 <126580400+DS-1090@users.noreply.github.com> Date: Fri, 31 May 2024 13:26:31 +0530 Subject: [PATCH 14/16] Updated Flower Icon --- lib/widgets/drawer.dart | 364 ++++++++++++++++++++-------------------- 1 file changed, 182 insertions(+), 182 deletions(-) diff --git a/lib/widgets/drawer.dart b/lib/widgets/drawer.dart index e107f50..d4d063f 100644 --- a/lib/widgets/drawer.dart +++ b/lib/widgets/drawer.dart @@ -1,182 +1,182 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:learn/utils/assets_path.dart'; -import 'package:learn/utils/route/route_constant.dart'; - -class MyDrawer extends StatelessWidget { - const MyDrawer({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Drawer( - child: SafeArea( - child: SingleChildScrollView( - child: Container( - color: Theme.of(context).canvasColor, - child: Column( - children: [ - DrawerHeader( - padding: const EdgeInsets.all(0), - decoration: - BoxDecoration(color: Theme.of(context).canvasColor), - child: UserAccountsDrawerHeader( - margin: const EdgeInsets.all(0), - decoration: - BoxDecoration(color: Theme.of(context).canvasColor), - accountName: Text( - "Learning App for kids", - style: Theme.of(context) - .textTheme - .titleLarge - ?.copyWith(fontWeight: FontWeight.bold), - ), - accountEmail: Text( - "Made by sapatevaibhav", - style: Theme.of(context).textTheme.bodyLarge, - ), - currentAccountPicture: const CircleAvatar( - backgroundImage: AssetImage("assets/images/dp.png"), - ), - ), - ), - _buildListTile( - icon: Icons.home, - title: "Home", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.homeRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.text_fields, - title: "A - Z", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.atozRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.pest_control_rodent_outlined, - title: "Animals", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.animalRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.egg, - title: "Birds", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.birdsRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.cloud, - title: "Seasons", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.seasonRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.pentagon_outlined, - title: "Shapes", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.shapesRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.back_hand_rounded, - title: "Body parts", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.partsRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.work, - title: "Occupations", - onTap: () { - Navigator.pushNamed( - context, AllRoutesConstant.occupationRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.sunny, - title: "Solar System", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.solarRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.palette, - title: "Colours", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.colourRoute); - }, - context: context, - ), - _buildListTileSVG( - icon: AssetsPath.getFlowerImage(Flowers.flowerIcon), - title: "Flowers", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.flowerRoute); - }, - context: context, - ), - _buildListTile( - icon: Icons.question_mark_outlined, - title: "About us", - onTap: () { - Navigator.pushNamed(context, AllRoutesConstant.aboutRoute); - }, - context: context, - ), - ], - ), - ), - ), - ), - ); - } - - Widget _buildListTile({ - required BuildContext context, - required IconData icon, - required String title, - required VoidCallback onTap, - }) { - return ListTile( - leading: Icon(icon), - title: Text( - title, - style: Theme.of(context).textTheme.bodyLarge, - ), - onTap: onTap, - ); - } - - Widget _buildListTileSVG({ - required BuildContext context, - required String icon, - required String title, - required VoidCallback onTap, - }) { - return ListTile( - leading: SvgPicture.asset( - icon, - width: 24, - height: 24, - ), - title: Text( - title, - style: Theme.of(context).textTheme.bodyLarge, - ), - onTap: onTap, - ); - } -} +import 'package:flutter/material.dart'; +// import 'package:flutter_svg/flutter_svg.dart'; +import 'package:learn/utils/assets_path.dart'; +import 'package:learn/utils/route/route_constant.dart'; + +class MyDrawer extends StatelessWidget { + const MyDrawer({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Drawer( + child: SafeArea( + child: SingleChildScrollView( + child: Container( + color: Theme.of(context).canvasColor, + child: Column( + children: [ + DrawerHeader( + padding: const EdgeInsets.all(0), + decoration: + BoxDecoration(color: Theme.of(context).canvasColor), + child: UserAccountsDrawerHeader( + margin: const EdgeInsets.all(0), + decoration: + BoxDecoration(color: Theme.of(context).canvasColor), + accountName: Text( + "Learning App for kids", + style: Theme.of(context) + .textTheme + .titleLarge + ?.copyWith(fontWeight: FontWeight.bold), + ), + accountEmail: Text( + "Made by sapatevaibhav", + style: Theme.of(context).textTheme.bodyLarge, + ), + currentAccountPicture: const CircleAvatar( + backgroundImage: AssetImage("assets/images/dp.png"), + ), + ), + ), + _buildListTile( + icon: Icons.home, + title: "Home", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.homeRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.text_fields, + title: "A - Z", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.atozRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.pest_control_rodent_outlined, + title: "Animals", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.animalRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.egg, + title: "Birds", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.birdsRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.cloud, + title: "Seasons", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.seasonRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.pentagon_outlined, + title: "Shapes", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.shapesRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.back_hand_rounded, + title: "Body parts", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.partsRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.work, + title: "Occupations", + onTap: () { + Navigator.pushNamed( + context, AllRoutesConstant.occupationRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.sunny, + title: "Solar System", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.solarRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.palette, + title: "Colours", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.colourRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.local_florist, + title: "Flowers", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.flowerRoute); + }, + context: context, + ), + _buildListTile( + icon: Icons.question_mark_outlined, + title: "About us", + onTap: () { + Navigator.pushNamed(context, AllRoutesConstant.aboutRoute); + }, + context: context, + ), + ], + ), + ), + ), + ), + ); + } + + Widget _buildListTile({ + required BuildContext context, + required IconData icon, + required String title, + required VoidCallback onTap, + }) { + return ListTile( + leading: Icon(icon), + title: Text( + title, + style: Theme.of(context).textTheme.bodyLarge, + ), + onTap: onTap, + ); + } + + // Widget _buildListTileSVG({ + // required BuildContext context, + // required String icon, + // required String title, + // required VoidCallback onTap, + // }) { + // return ListTile( + // leading: SvgPicture.asset( + // icon, + // width: 24, + // height: 24, + // ), + // title: Text( + // title, + // style: Theme.of(context).textTheme.bodyLarge, + // ), + // onTap: onTap, + // ); + // } +} From 92d20e140c34d89dd234fe5482220fad87a8a047 Mon Sep 17 00:00:00 2001 From: DS-1090 <126580400+DS-1090@users.noreply.github.com> Date: Fri, 31 May 2024 13:28:06 +0530 Subject: [PATCH 15/16] Updated flower asset paths --- lib/utils/assets_path.dart | 542 ++++++++++++++++++------------------- 1 file changed, 270 insertions(+), 272 deletions(-) diff --git a/lib/utils/assets_path.dart b/lib/utils/assets_path.dart index 5b1260f..0cebf9c 100644 --- a/lib/utils/assets_path.dart +++ b/lib/utils/assets_path.dart @@ -1,273 +1,271 @@ -class AssetsPath { - //Image assets - static const String _images = 'assets/images/'; - static const String _flowerImages = 'assets/images/flowers/'; - static const String _alphabetImages = 'assets/images/alphabet/'; - static const String _animalImages = 'assets/images/animal/'; - static const String _birdImages = 'assets/images/birds/'; - static const String _bodyImages = 'assets/images/body/'; - static const String _solarImages = 'assets/images/solar/'; - static const String _coloursImages = 'assets/colours/'; - - //Sound assets - static const String _sounds = 'assets/sounds/'; - static const String _animalSound = 'assets/sounds/animals/'; - static const String _birdSound = 'assets/sounds/birds/'; - - - //Image assets - - static String getImage(String name) { - return _images + name; - } - - static String getAlphabetImage(String name) { - return _alphabetImages + name; - } - - static String getAnimalImage(String name) { - return _animalImages + name; - } - - static String getBirdImage(String name) { - return _birdImages + name; - } - - static String getBodyImage(String name) { - return _bodyImages + name; - } - - static String getSolarImage(String name) { - return _solarImages + name; - } - - static String getColoursImage(String name) { - return _coloursImages + name; - } - - - static String getFlowerImage(String name) { - return _flowerImages + name; - } - - - //Sound assets - - static String getSound(String name) { - return _sounds + name; - } - - static String getAnimalSound(String name) { - return _animalSound + name; - } - - static String getBirdSound(String name) { - return _birdSound + name; - } - -} - -class Alphabets{ - static const String alphabets = 'alphabets.jpg'; - static const String apple = 'apple.svg'; - static const String ball = 'ball.svg'; - static const String cat = 'cat.svg'; - static const String dog = 'dog.svg'; - static const String elephant = 'elephant.svg'; - static const String fish = 'fish.svg'; - static const String grapes = 'grapes.svg'; - static const String horse = 'horse.svg'; - static const String icecream = 'icecream.svg'; - static const String joker = 'joker.svg'; - static const String king = 'king.svg'; - static const String lion = 'lion.svg'; - static const String money = 'money.svg'; - static const String nest = 'nest.svg'; - static const String orange = 'orange.svg'; - static const String parrot = 'parrot.svg'; - static const String queen = 'queen.svg'; - static const String rabbit = 'rabbit.svg'; - static const String shiva = 'shiva.svg'; - static const String table = 'table.svg'; - static const String umbrella = 'umbrella.svg'; - static const String van = 'van.svg'; - static const String window = 'window.svg'; - static const String xerox = 'xerox.svg'; - static const String yellow = 'yellow.svg'; - static const String zero = 'zero.svg'; -} - -class Animals{ - static const String animals = 'animals.jpg'; - static const String bear = 'bear.svg'; - static const String cat = 'cat.svg'; - static const String cow = 'cow.svg'; - static const String deer = 'deer.svg'; - static const String dog = 'dog.svg'; - static const String elephant = 'elephant.svg'; - static const String fox = 'fox.svg'; - static const String giraffe = 'giraffe.svg'; - static const String goat = 'goat.svg'; - static const String horse = 'horse.svg'; - static const String kangaroo = 'kangaroo.svg'; - static const String lion = 'lion.svg'; - static const String monkey = 'monkey.svg'; - static const String pig = 'pig.svg'; - static const String rabbit = 'rabbit.svg'; - static const String sheep = 'sheep.svg'; - static const String snake = 'snake.svg'; - static const String squirrel = 'squirrel.svg'; - static const String tiger = 'tiger.svg'; - static const String zebra = 'zebra.svg'; - - //sound - static const String bearSound = 'bear_sound.mp3'; - static const String catSound = 'cat_sound.wav'; - static const String cowSound = 'cow_sound.mp3'; - static const String deerSound = 'deer_sound.mp3'; - static const String dogSound = 'dog_sound.mp3'; - static const String elephantSound = 'elephant_sound.mp3'; - static const String foxSound = 'fox_sound.mp3'; - static const String giraffeSound = 'giraffe_sound.mp3'; - static const String goatSound = 'goat_sound.mp3'; - static const String horseSound = 'horse_sound.mp3'; - static const String kangarooSound = 'kangaroo_sound.mp3'; - static const String lionSound = 'lion_sound.mp3'; - static const String monkeySound = 'monkey_sound.mp3'; - static const String pigSound = 'pig_sound.mp3'; - static const String rabbitSound = 'rabbit_sound.mp3'; - static const String sheepSound = 'sheep_sound.mp3'; - static const String snakeSound = 'snake_sound.mp3'; - static const String squirrelSound = 'squirrel_sound.mp3'; - static const String tigerSound = 'tiger_sound.mp3'; - static const String zebraSound = 'zebra_sound.mp3'; - -} - -class Birds{ - static const String birds = 'birds.jpg'; - static const String bagula = 'Bagula.svg'; - static const String baya = 'Baya.svg'; - static const String bulbul = 'Bulbul.svg'; - static const String crow = 'Crow.svg'; - static const String duck = 'Duck.svg'; - static const String eagle = 'Eagle.svg'; - static const String goose = 'Goose.svg'; - static const String hen = 'Hen.svg'; - static const String hummingbird = 'Hummingbird.svg'; - static const String kingfisher = 'Kingfisher.svg'; - static const String koel = 'Koel.svg'; - static const String maina = 'Maina.svg'; - static const String ostrich = 'Ostrich.svg'; - static const String owl = 'Owl.svg'; - static const String parrot = 'Parrot.svg'; - static const String pigeon = 'Pigeon.svg'; - static const String robin = 'Robin.svg'; - static const String seagull = 'Seagull.svg'; - static const String sparrow = 'Sparrow.svg'; - static const String swan = 'Swan.svg'; - static const String vulture = 'Vulture.svg'; - static const String woodpecker = 'Woodpecker.svg'; - - //sound - - static const String bagulaSound = 'Bagula.mp3'; - static const String bayaSound = 'Baya.mp3'; - static const String bulbulSound = 'Bulbul.mp3'; - static const String crowSound = 'Crow.mp3'; - static const String duckSound = 'Duck.mp3'; - static const String eagleSound = 'Eagle.mp3'; - static const String gooseSound = 'Goose.mp3'; - static const String henSound = 'Hen.mp3'; - static const String hummingbirdSound = 'Hummingbird.mp3'; - static const String kingfisherSound = 'Kingfisher.mp3'; - static const String koelSound = 'Koel.mp3'; - static const String mainaSound = 'Maina.mp3'; - static const String ostrichSound = 'Ostrich.mp3'; - static const String owlSound = 'Owl.mp3'; - static const String parrotSound = 'Parrot.mp3'; - static const String pigeonSound = 'Pigeon.mp3'; - static const String robinSound = 'Robin.mp3'; - static const String seagullSound = 'Seagull.mp3'; - static const String sparrowSound = 'Sparrow.mp3'; - static const String swanSound = 'Swan.mp3'; - static const String vultureSound = 'Vulture.mp3'; - static const String woodpeckerSound = 'Woodpecker.mp3'; -} - -class Body { - static const String body = 'body.jpg'; - static const String ankle = 'Ankle.svg'; - static const String arm = 'Arm.svg'; - static const String back = 'Back.svg'; - static const String bally = 'Belly.svg'; - static const String cheek = 'Cheek.svg'; - static const String chest = 'Chest.svg'; - static const String chin = 'Chin.svg'; - static const String ear = 'Ear.svg'; - static const String elbow = 'Elbow.svg'; - static const String eye = 'Eye.svg'; - static const String finger = 'Finger.svg'; - static const String foot = 'Foot.svg'; - static const String hair = 'Hair.svg'; - static const String hips = 'Hips.svg'; - static const String knee = 'Knee.svg'; - static const String leg = 'Leg.svg'; - static const String lips = 'Lips.svg'; - static const String nail = 'Nail.svg'; - static const String neck = 'Neck.svg'; - static const String nose = 'Nose.svg'; - static const String palm = 'Palm.svg'; - static const String shoulder = 'Shoulder.svg'; - static const String stomach = 'Stomach.svg'; - static const String teeth = 'Teeth.svg'; - static const String thigh = 'Thigh.svg'; - static const String thumb = 'Thumb.svg'; - static const String toe = 'Toe.svg'; - static const String tongue = 'Tongue.svg'; - static const String waist = 'Waist.svg'; - static const String wrist = 'Wrist.svg'; -} - -class ColorImages{ - static const String colorsCover = 'colours-cover.png'; - static const String black = 'black.svg'; - static const String blue = 'blue.svg'; - static const String brown = 'brown.svg'; - static const String green = 'green.svg'; - static const String orange = 'orange.svg'; - static const String pink = 'pink.svg'; - static const String red = 'red.svg'; - static const String violet = 'violet.svg'; - static const String white = 'white.svg'; - static const String yellow = 'yellow.svg'; -} - -class Flowers { - static const String flowerBanner = 'flower_banner.jpeg'; - static const String flowerIcon = 'flower-icon.svg'; - static const String carnation = 'carnation.svg'; - static const String daffodil = 'daffodil.svg'; - static const String daisy = 'daisy.svg'; - static const String hibiscus = 'hibiscus.svg'; - static const String lavender = 'lavender.svg'; - static const String lily = 'lily.svg'; - static const String marigold = 'marigold.svg'; - static const String poppy = 'poppy.svg'; - static const String rose = 'rose.svg'; - static const String sunflower = 'sunflower.svg'; - static const String tulip = 'tulip.svg'; - -} - -class SolarSystem { - static const String sun = 'sun.svg'; - static const String earth = 'earth.svg'; - static const String jupiter = 'jupiter.svg'; - static const String mars = 'mars.svg'; - static const String mercury = 'mercury.svg'; - static const String neptune = 'neptune.svg'; - static const String saturn = 'saturn.svg'; - static const String uranus = 'uranus.svg'; - static const String venus = 'venus.svg'; +class AssetsPath { + //Image assets + static const String _images = 'assets/images/'; + static const String _flowerImages = 'assets/images/flowers/'; + static const String _alphabetImages = 'assets/images/alphabet/'; + static const String _animalImages = 'assets/images/animal/'; + static const String _birdImages = 'assets/images/birds/'; + static const String _bodyImages = 'assets/images/body/'; + static const String _solarImages = 'assets/images/solar/'; + static const String _coloursImages = 'assets/colours/'; + + //Sound assets + static const String _sounds = 'assets/sounds/'; + static const String _animalSound = 'assets/sounds/animals/'; + static const String _birdSound = 'assets/sounds/birds/'; + + + //Image assets + + static String getImage(String name) { + return _images + name; + } + + static String getAlphabetImage(String name) { + return _alphabetImages + name; + } + + static String getAnimalImage(String name) { + return _animalImages + name; + } + + static String getBirdImage(String name) { + return _birdImages + name; + } + + static String getBodyImage(String name) { + return _bodyImages + name; + } + + static String getSolarImage(String name) { + return _solarImages + name; + } + + static String getColoursImage(String name) { + return _coloursImages + name; + } + + + static String getFlowerImage(String name) { + return _flowerImages + name; + } + + + //Sound assets + + static String getSound(String name) { + return _sounds + name; + } + + static String getAnimalSound(String name) { + return _animalSound + name; + } + + static String getBirdSound(String name) { + return _birdSound + name; + } + +} + +class Alphabets{ + static const String alphabets = 'alphabets.jpg'; + static const String apple = 'apple.svg'; + static const String ball = 'ball.svg'; + static const String cat = 'cat.svg'; + static const String dog = 'dog.svg'; + static const String elephant = 'elephant.svg'; + static const String fish = 'fish.svg'; + static const String grapes = 'grapes.svg'; + static const String horse = 'horse.svg'; + static const String icecream = 'icecream.svg'; + static const String joker = 'joker.svg'; + static const String king = 'king.svg'; + static const String lion = 'lion.svg'; + static const String money = 'money.svg'; + static const String nest = 'nest.svg'; + static const String orange = 'orange.svg'; + static const String parrot = 'parrot.svg'; + static const String queen = 'queen.svg'; + static const String rabbit = 'rabbit.svg'; + static const String shiva = 'shiva.svg'; + static const String table = 'table.svg'; + static const String umbrella = 'umbrella.svg'; + static const String van = 'van.svg'; + static const String window = 'window.svg'; + static const String xerox = 'xerox.svg'; + static const String yellow = 'yellow.svg'; + static const String zero = 'zero.svg'; +} + +class Animals{ + static const String animals = 'animals.jpg'; + static const String bear = 'bear.svg'; + static const String cat = 'cat.svg'; + static const String cow = 'cow.svg'; + static const String deer = 'deer.svg'; + static const String dog = 'dog.svg'; + static const String elephant = 'elephant.svg'; + static const String fox = 'fox.svg'; + static const String giraffe = 'giraffe.svg'; + static const String goat = 'goat.svg'; + static const String horse = 'horse.svg'; + static const String kangaroo = 'kangaroo.svg'; + static const String lion = 'lion.svg'; + static const String monkey = 'monkey.svg'; + static const String pig = 'pig.svg'; + static const String rabbit = 'rabbit.svg'; + static const String sheep = 'sheep.svg'; + static const String snake = 'snake.svg'; + static const String squirrel = 'squirrel.svg'; + static const String tiger = 'tiger.svg'; + static const String zebra = 'zebra.svg'; + + //sound + static const String bearSound = 'bear_sound.mp3'; + static const String catSound = 'cat_sound.wav'; + static const String cowSound = 'cow_sound.mp3'; + static const String deerSound = 'deer_sound.mp3'; + static const String dogSound = 'dog_sound.mp3'; + static const String elephantSound = 'elephant_sound.mp3'; + static const String foxSound = 'fox_sound.mp3'; + static const String giraffeSound = 'giraffe_sound.mp3'; + static const String goatSound = 'goat_sound.mp3'; + static const String horseSound = 'horse_sound.mp3'; + static const String kangarooSound = 'kangaroo_sound.mp3'; + static const String lionSound = 'lion_sound.mp3'; + static const String monkeySound = 'monkey_sound.mp3'; + static const String pigSound = 'pig_sound.mp3'; + static const String rabbitSound = 'rabbit_sound.mp3'; + static const String sheepSound = 'sheep_sound.mp3'; + static const String snakeSound = 'snake_sound.mp3'; + static const String squirrelSound = 'squirrel_sound.mp3'; + static const String tigerSound = 'tiger_sound.mp3'; + static const String zebraSound = 'zebra_sound.mp3'; + +} + +class Birds{ + static const String birds = 'birds.jpg'; + static const String bagula = 'Bagula.svg'; + static const String baya = 'Baya.svg'; + static const String bulbul = 'Bulbul.svg'; + static const String crow = 'Crow.svg'; + static const String duck = 'Duck.svg'; + static const String eagle = 'Eagle.svg'; + static const String goose = 'Goose.svg'; + static const String hen = 'Hen.svg'; + static const String hummingbird = 'Hummingbird.svg'; + static const String kingfisher = 'Kingfisher.svg'; + static const String koel = 'Koel.svg'; + static const String maina = 'Maina.svg'; + static const String ostrich = 'Ostrich.svg'; + static const String owl = 'Owl.svg'; + static const String parrot = 'Parrot.svg'; + static const String pigeon = 'Pigeon.svg'; + static const String robin = 'Robin.svg'; + static const String seagull = 'Seagull.svg'; + static const String sparrow = 'Sparrow.svg'; + static const String swan = 'Swan.svg'; + static const String vulture = 'Vulture.svg'; + static const String woodpecker = 'Woodpecker.svg'; + + //sound + + static const String bagulaSound = 'Bagula.mp3'; + static const String bayaSound = 'Baya.mp3'; + static const String bulbulSound = 'Bulbul.mp3'; + static const String crowSound = 'Crow.mp3'; + static const String duckSound = 'Duck.mp3'; + static const String eagleSound = 'Eagle.mp3'; + static const String gooseSound = 'Goose.mp3'; + static const String henSound = 'Hen.mp3'; + static const String hummingbirdSound = 'Hummingbird.mp3'; + static const String kingfisherSound = 'Kingfisher.mp3'; + static const String koelSound = 'Koel.mp3'; + static const String mainaSound = 'Maina.mp3'; + static const String ostrichSound = 'Ostrich.mp3'; + static const String owlSound = 'Owl.mp3'; + static const String parrotSound = 'Parrot.mp3'; + static const String pigeonSound = 'Pigeon.mp3'; + static const String robinSound = 'Robin.mp3'; + static const String seagullSound = 'Seagull.mp3'; + static const String sparrowSound = 'Sparrow.mp3'; + static const String swanSound = 'Swan.mp3'; + static const String vultureSound = 'Vulture.mp3'; + static const String woodpeckerSound = 'Woodpecker.mp3'; +} + +class Body { + static const String body = 'body.jpg'; + static const String ankle = 'Ankle.svg'; + static const String arm = 'Arm.svg'; + static const String back = 'Back.svg'; + static const String bally = 'Belly.svg'; + static const String cheek = 'Cheek.svg'; + static const String chest = 'Chest.svg'; + static const String chin = 'Chin.svg'; + static const String ear = 'Ear.svg'; + static const String elbow = 'Elbow.svg'; + static const String eye = 'Eye.svg'; + static const String finger = 'Finger.svg'; + static const String foot = 'Foot.svg'; + static const String hair = 'Hair.svg'; + static const String hips = 'Hips.svg'; + static const String knee = 'Knee.svg'; + static const String leg = 'Leg.svg'; + static const String lips = 'Lips.svg'; + static const String nail = 'Nail.svg'; + static const String neck = 'Neck.svg'; + static const String nose = 'Nose.svg'; + static const String palm = 'Palm.svg'; + static const String shoulder = 'Shoulder.svg'; + static const String stomach = 'Stomach.svg'; + static const String teeth = 'Teeth.svg'; + static const String thigh = 'Thigh.svg'; + static const String thumb = 'Thumb.svg'; + static const String toe = 'Toe.svg'; + static const String tongue = 'Tongue.svg'; + static const String waist = 'Waist.svg'; + static const String wrist = 'Wrist.svg'; +} + +class ColorImages{ + static const String colorsCover = 'colours-cover.png'; + static const String black = 'black.svg'; + static const String blue = 'blue.svg'; + static const String brown = 'brown.svg'; + static const String green = 'green.svg'; + static const String orange = 'orange.svg'; + static const String pink = 'pink.svg'; + static const String red = 'red.svg'; + static const String violet = 'violet.svg'; + static const String white = 'white.svg'; + static const String yellow = 'yellow.svg'; +} + +class Flowers { + static const String flowerBanner = 'flower_banner.jpeg'; + static const String daisy = 'daisy.svg'; + static const String hibiscus = 'hibiscus.svg'; + static const String lavender = 'lavender.svg'; + static const String lily = 'lily.svg'; + static const String marigold = 'marigold.svg'; + static const String rose = 'rose.svg'; + static const String sunflower = 'sunflower.svg'; + static const String tulip = 'tulip.svg'; + static const String dandelion = 'dandelion.svg'; + static const String jasmine = 'jasmine.svg'; + static const String lotus = 'lotus.svg'; +} + +class SolarSystem { + static const String sun = 'sun.svg'; + static const String earth = 'earth.svg'; + static const String jupiter = 'jupiter.svg'; + static const String mars = 'mars.svg'; + static const String mercury = 'mercury.svg'; + static const String neptune = 'neptune.svg'; + static const String saturn = 'saturn.svg'; + static const String uranus = 'uranus.svg'; + static const String venus = 'venus.svg'; } \ No newline at end of file From 229c851ceffffec9d12dc50794271089c400c4c7 Mon Sep 17 00:00:00 2001 From: AsmitaMishra24 <146121869+AsmitaMishra24@users.noreply.github.com> Date: Fri, 31 May 2024 19:38:39 +0530 Subject: [PATCH 16/16] Added Drawing Board --- lib/pages/explore/drawingboard.dart | 56 ++++++++++++++++++++++------- pubspec.yaml | 1 + 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/lib/pages/explore/drawingboard.dart b/lib/pages/explore/drawingboard.dart index 556c25f..b3c33de 100644 --- a/lib/pages/explore/drawingboard.dart +++ b/lib/pages/explore/drawingboard.dart @@ -1,5 +1,6 @@ import 'dart:ui'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; class DrawingBoardPage extends StatelessWidget { const DrawingBoardPage({Key? key}); @@ -20,6 +21,7 @@ class DrawingBoard extends StatefulWidget { class _DrawingBoardState extends State { Color selectedColor = Colors.black; double strokeWidth = 5; + bool isEraser = false; List drawingPoints = []; List colors = [ Colors.pink, @@ -38,12 +40,20 @@ class _DrawingBoardState extends State { appBar: AppBar( title: Text("Drawing Board"), actions: [ - IconButton( - icon:Icon(Icons.clear), + TextButton.icon( onPressed: () => setState(() => drawingPoints = []), + icon: Icon(Icons.clear), + label: Text("Clear Board"), + style: TextButton.styleFrom( + backgroundColor: Color(0xfff7f2fa), + ), + ), + SizedBox( + width: 10, ), ], - ), + ), + body: Stack( children: [ GestureDetector( @@ -53,7 +63,7 @@ class _DrawingBoardState extends State { DrawingPoint( details.localPosition, Paint() - ..color = selectedColor + ..color = isEraser? Color(0xfffef7ff) : selectedColor ..isAntiAlias = true ..strokeWidth = strokeWidth ..strokeCap = StrokeCap.round, @@ -61,13 +71,14 @@ class _DrawingBoardState extends State { ); }); }, + onPanUpdate: (details) { setState(() { drawingPoints.add( DrawingPoint( details.localPosition, Paint() - ..color = selectedColor + ..color = isEraser? Color(0xfffef7ff) : selectedColor ..isAntiAlias = true ..strokeWidth = strokeWidth ..strokeCap = StrokeCap.round, @@ -75,11 +86,13 @@ class _DrawingBoardState extends State { ); }); }, + onPanEnd: (details) { setState(() { drawingPoints.add(null); }); }, + child: CustomPaint( painter: _DrawingPainter(drawingPoints), child: Container( @@ -88,21 +101,33 @@ class _DrawingBoardState extends State { ), ), ), + Positioned( - top: 40, - right: 30, + top: 20, + right: 10, + left: 10, child: Row( children: [ Slider( min: 0, max: 40, value: strokeWidth, - onChanged:(val) => setState(() => strokeWidth = val), + onChanged: (val) => setState(() => strokeWidth = val), ), - - ElevatedButton.icon(onPressed: () => setState(() => drawingPoints = []), - icon: Icon(Icons.clear), - label: Text("Clear Board"), + SizedBox( + width: 50 + ), + ElevatedButton.icon( + onPressed: () { + setState(() { + isEraser =!isEraser; + if (isEraser) { + selectedColor = Color(0xfffef7ff); + } + }); + }, + icon: Icon(FontAwesomeIcons.eraser), + label: Text("Eraser"), ), ], ), @@ -129,7 +154,12 @@ class _DrawingBoardState extends State { GestureDetector _buildColorChoser(Color color) { bool isSelected = selectedColor == color; return GestureDetector( - onTap: () => setState(() => selectedColor = color), + onTap: () { + setState(() { + selectedColor = color; + isEraser = false; + }); + }, child: Container( height: isSelected ? 47 : 40, width: isSelected ? 47 : 40, diff --git a/pubspec.yaml b/pubspec.yaml index a284a1a..99a1538 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -46,6 +46,7 @@ dependencies: google_nav_bar: ^5.0.6 flutter_bloc: ^8.1.5 animated_text_kit: ^4.2.2 + font_awesome_flutter: ^10.1.0 dev_dependencies: flutter_test: