Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
NamrataCSalvi authored Jul 17, 2024
2 parents 8e82ac8 + 73bc559 commit 516ac96
Show file tree
Hide file tree
Showing 13 changed files with 771 additions and 258 deletions.
128 changes: 87 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,64 @@
# Learn
![GSSoC Logo Light](https://user-images.githubusercontent.com/63473496/213306239-9e8fc317-ce2f-4127-8bfe-17f5df06ee99.png#gh-light-mode-only)
![GSSoC Logo Dark](https://user-images.githubusercontent.com/63473496/213306279-338f7ce9-9a9f-4427-8c2a-3e344874498f.png#gh-dark-mode-only)
<br>
<div align="center">
<img src="https://readme-typing-svg.herokuapp.com?color=45ffaa&size=40&width=900&height=80&lines=Welcome-to-Learn"/>
</div>

![IzzyOnDroid](https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/vdrs.sappu.lafk.learn) &nbsp;
[![made-with-flutter](https://img.shields.io/badge/Made%20with-Flutter-1f425f.svg)](https://flutter.dev/) &nbsp;
![Release](https://img.shields.io/github/v/release/VaibhavCodeClub/learn) &nbsp; ![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)
&nbsp;
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg) &nbsp;
<a href="https://github.com/VaibhavCodeClub/learn"><img src="https://sloc.xyz/github/VaibhavCodeClub/learn" alt="Lines of Code"/></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/stargazers"><img src="https://img.shields.io/github/stars/VaibhavCodeClub/learn" alt="Stars Badge"/></a>
&nbsp;<a href="https://github.com/VaibhavCodeClub/learn/network/members"><img src="https://img.shields.io/github/forks/VaibhavCodeClub/learn" alt="Forks Badge"/></a>
&nbsp; <br>
![GitHub contributors](https://img.shields.io/github/contributors/VaibhavCodeClub/learn?color=blue)
&nbsp;
![GitHub last commit](https://img.shields.io/github/last-commit/VaibhavCodeClub/learn?color=red&style=plastic)
&nbsp;
![Repo. Size](https://img.shields.io/github/repo-size/VaibhavCodeClub/learn?color=white)
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?v=103"></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/issues"><img src="https://img.shields.io/github/issues/VaibhavCodeClub/learn?color=0059b3"></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/VaibhavCodeClub/learn?color=yellow"></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/pulls"><img src="https://img.shields.io/github/issues-pr/VaibhavCodeClub/learn?color=brightgreen"></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed-raw/VaibhavCodeClub/learn?color=0059b3"></a>
&nbsp;

<div align="center">
<a href="https://android.izzysoft.de/repo/apk/vdrs.sappu.lafk.learn"> <img src='readme/IzzyOnDroid.png' width='150'/> </a>
<a href="https://github.com/VaibhavCodeClub/learn/releases"> <img src='readme/GitHub.png' width='150'/> </a> <br>
</div>
<br>

<a href="https://android.izzysoft.de/repo/apk/vdrs.sappu.lafk.learn"> <img src='readme/IzzyOnDroid.png' width='200'/> </a>
<a href="https://github.com/VaibhavCodeClub/learn/releases"> <img src='readme/GitHub.png' width='200'/> </a> <br>
</div>
Welcome to <strong>Learn</strong>, a simple learning app built using Flutter for kids. This app is designed to provide an engaging learning experience for children, covering a wide range of topics including :
<strong>Learn</strong>, a simple learning app built using Flutter for kids. This app is designed to provide an engaging learning experience for children, covering a wide range of topics including :

- A-Z Alphabets with examples and pronunciation.
- Animals and their pronunciation along with their voices.
- Body parts and their pronunciation with Short information on various topics.

More exciting features are planned for future updates, such as birds and their voices, information on the solar system, knowledge of shapes, and much more!

## 🏆 Featured in:

<table>
<thead>
<tr>
<th>Event Logo</th>
<th>Event Name</th>
<th>Event Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="readme/Gssoc Label.png" alt="GirlScript Summer of Code 2024 Logo"></td>
<td>GirlScript Summer of Code 2024</td>
<td>GirlScript Summer of Code is a three-month-long Open Source Program conducted every summer by GirlScript Foundation. It is an initiative to bring more beginners to Open-Source Software Development.</td>
</tr>
<tr>
<td><img src="readme/vsoc.png" alt="GirlScript Summer of Code 2024 Logo"></td>
<td>Vinyasa Summer of Code 2024</td>
<td>Vinyasa Summer of Code represents an exciting opportunity for students in computer science and design to delve into innovative projects and collaborative learning.</td>
</tr>
</tbody>
</table>

## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [Contributing Guidelines](#contributing-guidelines)
- [Getting Started](#getting-started)
- [Clone the Git Repository](#clone-the-git-repository)
- [Run the Flutter Project](#run-the-flutter-project)
- [Screenshots](#screenshots)
- [License](#license)

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

## Contributing Guidelines

We believe in the power of collaboration. If you have ideas to improve College.ai, feel free to contribute! Check out our [Contribution Guidelines](CONTRIBUTING.md) to get started.


### Getting Started

To get started with the **Learn** app, follow these simple steps :
Expand Down Expand Up @@ -76,14 +91,11 @@ That's it! The app should now be running on your device/emulator.

**Note:** If you encounter any issues or have suggestions for improvement, please feel free to [create an issue](https://github.com/VaibhavCodeClub/learn/issues/new/choose) on our GitHub repository. We appreciate your feedback!

Made with ❤️ by [sapatevaibhav](https://github.com/sapatevaibhav).

Don't forget to star ⭐ the repository if you find it useful!
<!-- Hits since 10 May 2024 00:20 IST -->
![visitors](https://hits.sh/github.com/sapatevaibhav.learn/hits.svg)
## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
<br>


<h2 align = "center">Our Contributors ❤️</h2>
<div align = "center">
<h3>Thank you for contributing to our repository</h3>
Expand All @@ -92,6 +104,40 @@ Don't forget to star ⭐ the repository if you find it useful!


</div>
<br>

<div style="text-align: center;">
<p>Made with ❤️ by <a href="https://github.com/sapatevaibhav">sapatevaibhav</a>.</p>
</div>


Don't forget to star ⭐ the repository if you find it useful!
<!-- Hits since 10 May 2024 00:20 IST -->
![visitors](https://hits.sh/github.com/sapatevaibhav.learn/hits.svg)
![IzzyOnDroid](https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/vdrs.sappu.lafk.learn) &nbsp;
[![made-with-flutter](https://img.shields.io/badge/Made%20with-Flutter-1f425f.svg)](https://flutter.dev/) &nbsp;
![Release](https://img.shields.io/github/v/release/VaibhavCodeClub/learn) &nbsp; ![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)
&nbsp;
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg) &nbsp;
<a href="https://github.com/VaibhavCodeClub/learn"><img src="https://sloc.xyz/github/VaibhavCodeClub/learn" alt="Lines of Code"/></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/stargazers"><img src="https://img.shields.io/github/stars/VaibhavCodeClub/learn" alt="Stars Badge"/></a>
&nbsp;<a href="https://github.com/VaibhavCodeClub/learn/network/members"><img src="https://img.shields.io/github/forks/VaibhavCodeClub/learn" alt="Forks Badge"/></a>
&nbsp; <br>
![GitHub contributors](https://img.shields.io/github/contributors/VaibhavCodeClub/learn?color=blue)
&nbsp;
![GitHub last commit](https://img.shields.io/github/last-commit/VaibhavCodeClub/learn?color=red&style=plastic)
&nbsp;
![Repo. Size](https://img.shields.io/github/repo-size/VaibhavCodeClub/learn?color=white)
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?v=103"></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/issues"><img src="https://img.shields.io/github/issues/VaibhavCodeClub/learn?color=0059b3"></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/VaibhavCodeClub/learn?color=yellow"></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/pulls"><img src="https://img.shields.io/github/issues-pr/VaibhavCodeClub/learn?color=brightgreen"></a>
&nbsp;
<a href="https://github.com/VaibhavCodeClub/learn/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed-raw/VaibhavCodeClub/learn?color=0059b3"></a>
&nbsp;

51 changes: 51 additions & 0 deletions lib/favorite_page_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';

class FavouriteScreenProvider with ChangeNotifier {
bool _drawingBoard = false;
bool get drawingBoard => _drawingBoard;

List<int> _selectedItemList = [];

List<int> get selectedItemList => _selectedItemList;

FavouriteScreenProvider() {
loadFromPrefs();
}

void setDrawingBoard() {
_drawingBoard = !_drawingBoard;
notifyListeners();
saveToPrefs();
}

void setList(int item) {
_selectedItemList.add(item);
notifyListeners();
saveToPrefs();
}

void removeList(int item) {
_selectedItemList.remove(item);
notifyListeners();
saveToPrefs();
}

Future<void> loadFromPrefs() async {
final prefs = await SharedPreferences.getInstance();
_drawingBoard = prefs.getBool('drawingBoard') ?? false;
_selectedItemList = prefs
.getStringList('selectedItemList')
?.map((e) => int.parse(e))
.toList() ??
[];
notifyListeners();
}

Future<void> saveToPrefs() async {
final prefs = await SharedPreferences.getInstance();
await prefs.setBool('drawingBoard', _drawingBoard);
await prefs.setStringList('selectedItemList',
_selectedItemList.map((e) => e.toString()).toList());
}
}
2 changes: 1 addition & 1 deletion lib/landing_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class _LandingPageState extends State<LandingPage> {
}
Navigator.popAndPushNamed(
context,
AllRoutesConstant.mainhomeRoute,
AllRoutesConstant.homeRoute,
);
},
child: Text(
Expand Down
26 changes: 17 additions & 9 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:adaptive_theme/adaptive_theme.dart';
import 'package:learn/favorite_page_provider.dart';
import 'package:learn/landing_page.dart';
import 'package:learn/pages/main_home.dart';
import 'package:learn/utils/route/routes.dart';
Expand All @@ -9,20 +10,25 @@ import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';

DateTime? currentBackPressTime;
bool visitedGettingStartedPageOnceBool=false; //to store the value of
bool visitedGettingStartedPageOnceBool = false; //to store the value of

void main() async {
WidgetsFlutterBinding.ensureInitialized();
final savedThemeMode = await AdaptiveTheme.getThemeMode();
final prefs = await SharedPreferences.getInstance();
visitedGettingStartedPageOnceBool = prefs.getBool('visitedGettingStartedPageOnce')??false; //if its is null i.e first time then set to false
visitedGettingStartedPageOnceBool =
prefs.getBool('visitedGettingStartedPageOnce') ??
false; //if its is null i.e first time then set to false

runApp(
ChangeNotifierProvider(
create: (context) => ThemeProvider(),
child: MyApp(savedThemeMode: savedThemeMode),
),
);
runApp(MultiProvider(
providers: [
ChangeNotifierProvider(
create: (context) => ThemeProvider(),
),
ChangeNotifierProvider(create: (context) => FavouriteScreenProvider()),
],
child: MyApp(savedThemeMode: savedThemeMode),
));
}

class MyApp extends StatelessWidget {
Expand All @@ -40,7 +46,9 @@ class MyApp extends StatelessWidget {
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
themeMode: themeProvider.themeMode,
home: visitedGettingStartedPageOnceBool? const MainHome(): const LandingPage(), //if page opened for first time , show landing page (getting started page), else show home page
home: visitedGettingStartedPageOnceBool
? const MainHome()
: const LandingPage(), //if page opened for first time , show landing page (getting started page), else show home page
onGenerateRoute: Routers.generateRoute,
);
},
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/explore/drawingboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class DrawingBoard extends StatefulWidget {
const DrawingBoard({Key? key}) : super(key: key);

@override
_DrawingBoardState createState() => _DrawingBoardState();
DrawingBoardState createState() => DrawingBoardState();
}

class _DrawingBoardState extends State<DrawingBoard> {
class DrawingBoardState extends State<DrawingBoard> {
Color selectedColor = Colors.black;
double strokeWidth = 5.0;
bool isEraser = false;
Expand Down
Loading

0 comments on commit 516ac96

Please sign in to comment.