Skip to content

Commit

Permalink
Merge branch 'VaibhavCodeClub:master' into ui-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
prajapatihet authored Jun 2, 2024
2 parents fdf6218 + d6b5cc4 commit 590dc7a
Show file tree
Hide file tree
Showing 24 changed files with 1,311 additions and 4,121 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.
2 changes: 1 addition & 1 deletion lib/landing_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class _LandingPageState extends State<LandingPage> {
onPressed: () {
Navigator.popAndPushNamed(
context,
AllRoutesConstant.mainhome,
AllRoutesConstant.mainhomeRoute,
);
},
child: Text(
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ class MyApp extends StatelessWidget {
onGenerateRoute: Routers.generateRoute,
);
}
}
}
295 changes: 169 additions & 126 deletions lib/pages/explore.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:learn/utils/constants.dart';
import 'package:learn/utils/route/route_constant.dart';

import '../utils/const_dimensions.dart';

Expand All @@ -12,141 +14,182 @@ class ExplorePage extends StatelessWidget {
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),
),
),
),
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
return GestureDetector(
onTap: () => Navigator.push(
context,
AppConstants.modules[index].route,
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: 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),
),
],
),
),
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
return GestureDetector(
onTap: () => Navigator.push(
context,
AppConstants.modules[index].route,
),
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,
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,
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,
),
)),
);
},
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, '/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,
// ),
// ),
// ],
// ),
// ),
// ),
Loading

0 comments on commit 590dc7a

Please sign in to comment.