Skip to content

Commit

Permalink
Merge branch 'master' into AppConstants
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav-Kushwaha-1225 authored Jun 1, 2024
2 parents 1edf90b + d6b5cc4 commit 18bb215
Show file tree
Hide file tree
Showing 36 changed files with 1,892 additions and 4,384 deletions.
26 changes: 26 additions & 0 deletions assets/explore/drawing_board.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 56 additions & 1 deletion assets/images/flowers/daisy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/images/flowers/dandelion.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 22 additions & 22 deletions assets/images/flowers/flower-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion assets/images/flowers/hibiscus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/flowers/jasmine.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,332 changes: 10 additions & 3,322 deletions assets/images/flowers/lavender.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 54 additions & 1 deletion assets/images/flowers/lily.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/flowers/lotus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion assets/images/flowers/marigold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion assets/images/flowers/rose.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion assets/images/flowers/sunflower.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion assets/images/flowers/tulip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
135 changes: 71 additions & 64 deletions lib/landing_page.dart
Original file line number Diff line number Diff line change
@@ -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<LandingPage> createState() => _LandingPageState();
Expand All @@ -18,88 +20,93 @@ class _LandingPageState extends State<LandingPage> {
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)),
),

Center(
child: SizedBox(
width: width/1.5,
height: height/10,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
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(
)),
onPressed: () {
Navigator.popAndPushNamed(
context,
AllRoutesConstant.mainhomeRoute,
);
},
child: Text(
"Get started",
style: TextStyle(
color: Colors.white,
fontSize: (width < height) ? width/19 : height/19
),
),
fontSize:
(width < height) ? width / 19 : height / 19),
),
),
),

],
),
),
],
),
),
),
);
}
}
}
78 changes: 9 additions & 69 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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<IndexCubit, int>(
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,
);
}
}
}
Loading

0 comments on commit 18bb215

Please sign in to comment.