Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented the landing page for the application and Removed the UI overflow #135

Merged
merged 5 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/images/studying.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 105 additions & 0 deletions lib/landing_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import 'package:flutter/material.dart';
import 'package:animated_text_kit/animated_text_kit.dart';
import 'pages/home.dart';

class LandingPage extends StatefulWidget {
const LandingPage({super.key});

@override
State<LandingPage> createState() => _LandingPageState();
}

class _LandingPageState extends State<LandingPage> {
@override
Widget build(BuildContext context) {
double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height;
return Scaffold(
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
),
),
),
),

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: 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
),
),
),
),
),

],
),
),
),
),
);
}
}
3 changes: 3 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ 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';

DateTime? currentBackPressTime;

Expand Down Expand Up @@ -50,6 +51,7 @@ class MyApp extends StatelessWidget {
title: 'Home',
theme: theme,
darkTheme: darkTheme,
initialRoute: '/landing_page',
home: Scaffold(
body: const [
MyHomePage(),
Expand All @@ -76,6 +78,7 @@ class MyApp extends StatelessWidget {
AllRoutes.seasonRoute: (context) => const SeasonsPage(),
AllRoutes.occupationRoute: (context) => OccupationPage(),
AllRoutes.fruitRoute: (context) => FruitsPage(),
"/landing_page": (context) => const LandingPage(),
},
);
},
Expand Down
137 changes: 73 additions & 64 deletions lib/pages/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,70 +19,72 @@ class AboutPage extends StatelessWidget {
style: TextStyle(fontWeight: FontWeight.bold),
),
),
body: Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Learning app for kids',
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Learning app for kids',
style: TextStyle(
fontSize: 24.0,
fontWeight: FontWeight.bold,
),
),
),
const SizedBox(height: ConstantDimensions.heightSmall_Medium),
const Text(
'Version: 1.1.0',
style: TextStyle(fontSize: 18.0),
),
const SizedBox(height: ConstantDimensions.heightSmall_Medium / 2),
const Text(
'Developed by: sapatevaibhav',
style: TextStyle(fontSize: 18.0),
),
const SizedBox(height: ConstantDimensions.heightSmall_Medium),
const Text(
'Description:',
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,

const SizedBox(height: 16.0),
const Text(
'Version: 1.1.0',
style: TextStyle(fontSize: 18.0),
),
),
const SizedBox(height: ConstantDimensions.heightSmall_Medium / 2),
const Text(
AppConstants.description,
style: TextStyle(fontSize: 18.0),
),
const SizedBox(height: ConstantDimensions.heightExtraSmall),
const Text(
'Source code:',
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
const SizedBox(height: 8.0),
const Text(
'Developed by: sapatevaibhav',
style: TextStyle(fontSize: 18.0),
),
),
GestureDetector(
onTap: () {
_launchURL(context, "https://github.com/VaibhavCodeClub/learn");
},
child: SvgPicture.asset(
'assets/images/git.svg',
width: ConstantDimensions.widthSmall_Medium * 2,
height: ConstantDimensions.heightSmall_Medium * 2,
color: Theme.of(context).brightness == Brightness.dark
? Colors.white
: Colors.black,
const SizedBox(height: 16.0),
const Text(
'Description:',
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
),
const SizedBox(height: ConstantDimensions.heightSmall_Medium),
const Text(
'Connect:',
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
const SizedBox(height: 8.0),
const Text(
AppConstants.description,
style: TextStyle(fontSize: 18.0),
),
const SizedBox(height: 6.0),
const Text(
'Source code:',
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
GestureDetector(
onTap: () {
_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,
),
),
const SizedBox(height: 16.0),
const Text(
'Connect:',
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
),
),
),
Row(
children: [
GestureDetector(
Expand Down Expand Up @@ -138,12 +140,19 @@ class AboutPage extends StatelessWidget {
: Colors.black,
),
),
],
),
],

]
)
],

),
),

),
),
);

);


}

void _launchURL(BuildContext context, String url) async {
Expand Down
14 changes: 8 additions & 6 deletions lib/pages/modules/animals.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ class AnimalsPage extends StatelessWidget {
showDialog(
context: context,
builder: (BuildContext context) {
return AnimalPopup(
animal: animal,
flutterTts: flutterTts,
audioPlayer: audioPlayer,
animals: AppConstants.animals,
currentIndex: currentIndex,
return SingleChildScrollView(
child: AnimalPopup(
animal: animal,
flutterTts: flutterTts,
audioPlayer: audioPlayer,
animals: AppConstants.animals,
currentIndex: currentIndex,
),
);
},
);
Expand Down
Loading