Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Maheen-Ilyas committed Jul 19, 2024
2 parents 2a7e2c0 + 80286ee commit ba66da2
Show file tree
Hide file tree
Showing 28 changed files with 511 additions and 327 deletions.
3 changes: 3 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
analyzer:
errors:
library_prefixes: ignore
include: package:flutter_lints/flutter.yaml

linter:
Expand Down
6 changes: 3 additions & 3 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jun 23 18:56:31 IST 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file added assets/images/numbers/eight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/five.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/four.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/nine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/numbers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/one.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/seven.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/six.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/three.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/two.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/numbers/zero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions lib/landing_page.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: use_build_context_synchronously

import 'package:flutter/material.dart';
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:learn/utils/route/route_constant.dart';
Expand Down Expand Up @@ -88,9 +90,12 @@ class _LandingPageState extends State<LandingPage> {
//bool check initiates
final SharedPreferences prefs =
await SharedPreferences.getInstance();
if (!prefs.containsKey('visitedGettingStartedPageOnce') || prefs.getBool('visitedGettingStartedPageOnce')==false) { //if it never existed or if it is false somehow
await prefs.setBool(
'visitedGettingStartedPageOnce', true); //set to true
if (!prefs.containsKey('visitedGettingStartedPageOnce') ||
prefs.getBool('visitedGettingStartedPageOnce') ==
false) {
//if it never existed or if it is false somehow
await prefs.setBool('visitedGettingStartedPageOnce',
true); //set to true
}
Navigator.popAndPushNamed(
context,
Expand Down
13 changes: 13 additions & 0 deletions lib/models/number_model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'package:flutter/material.dart';

class Number {
final String name;
final String resource;
final Color background;

Number({
required this.name,
required this.resource,
required this.background,
});
}
281 changes: 5 additions & 276 deletions lib/pages/explore/explore.dart
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
// ignore_for_file: unused_import

import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:learn/pages/explore/quiz.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/planets.dart';
import 'package:learn/pages/modules/shapes.dart';
import 'package:learn/utils/constants.dart';
import 'package:learn/utils/const_dimensions.dart';
import 'package:learn/utils/route/route_constant.dart';
import 'package:provider/provider.dart';
import '../../favorite_page_provider.dart';
import '../../theme_provider.dart';
import '../../utils/const_dimensions.dart';
import '../../widgets/drawer.dart';


// Explore Page
class ExplorePage extends StatefulWidget {
Expand Down Expand Up @@ -55,276 +53,7 @@ class _ExplorePageState extends State<ExplorePage> {
'Explore',
style: TextStyle(fontWeight: FontWeight.bold),
),
actions: [
Padding(
padding: const EdgeInsets.only(right: 16, top: 1),
child: IconButton(
icon: Icon(
themeProvider.themeMode == ThemeMode.dark
? Icons.dark_mode
: Icons.light_mode,
),
onPressed: () {
themeProvider.toggleTheme();
},
),
),
],
),
body: SafeArea(
child: CustomScrollView(
slivers: [
// SliverAppBar(
// pinned: true,
// 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: SliverChildListDelegate(
[
// GestureDetector(
// onTap: () {
// Navigator.push(
// context,
// (MaterialPageRoute(
// builder: (context) => const Quiz())));
// },
// child: Container(
// margin: const EdgeInsets.symmetric(
// horizontal: 18.0, vertical: 8),
// 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.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: SvgPicture.asset(
'assets/explore/drawing_board.svg',
fit: BoxFit.cover,
),
),
Positioned.fill(
child: Align(
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
"Drawing Board",
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(
"Drawing Board for Artist Kids!",
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,
),
],
),
),
],
),
),
),
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
width: 40,
height: 40,
margin: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(10),
),
child:
Consumer<FavouriteScreenProvider>(
builder: (context, item, child) {
return IconButton(
onPressed: () {
item.setDrawingBoard();
},
icon: item.drawingBoard
? const Icon(
Icons.favorite,
size: 25,
color: Colors.red,
)
: const Icon(
Icons.favorite_border,
size: 25,
),
);
},
),
),
],
)
],
),
)),
),
],
),
),
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
return GestureDetector(
onTap: () {
try {
switch (index) {
case 0:
Navigator.push(
context,
(MaterialPageRoute(
builder: (context) => const Quiz())));
break;
case 1:
Navigator.push(
context,
(MaterialPageRoute(
builder: (context) => const AtoZ())));
break;
case 2:
Navigator.push(
context,
(MaterialPageRoute(
builder: (context) => BirdsPage())));
break;
case 3:
Navigator.push(
context,
(MaterialPageRoute(
builder: (context) =>
const ColoursPage())));
break;
case 4:
Navigator.push(
context,
(MaterialPageRoute(
builder: (context) => BirdsPage())));
break;
case 5:
Navigator.push(
context,
(MaterialPageRoute(
builder: (context) =>
const ShapesPage())));
break;
case 6:
Navigator.push(
context,
(MaterialPageRoute(
builder: (context) =>
PlanetsPage())));
break;
default:
break;
}
} catch (e) {
// ignore: avoid_print
print(e);
}
},
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),
Expand Down
Loading

0 comments on commit ba66da2

Please sign in to comment.