Skip to content

Commit

Permalink
Initial Release (#1)
Browse files Browse the repository at this point in the history
* code cleanup

* add github button to about page

* new app icon for android and win

* replace android icons with transparent version

* add git url to about screen

* update about menu

* add imprint template

* added imprint and assets folder

* add markdown package that does not work yet

* fix markdown imprint

* remove misleading comment lul

* add privacy.md

* add privacy link

* update settings screen

* update build.gradle

* rename quickmaths to multiplyme

* add error handling for when range a is greater than b

* add internet permission

* update url bullshit

* bump minSdkVersion to android 8

* bump build number

* update readme
  • Loading branch information
ntdoJanneck authored Mar 12, 2023
1 parent d05dc29 commit df9a57c
Show file tree
Hide file tree
Showing 34 changed files with 460 additions and 160 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

# Ignore imprint.md
assets/imprint.md

upload-keystore.jks
37 changes: 0 additions & 37 deletions LocalizationTable.csv

This file was deleted.

Binary file removed LocalizationTable.xlsx
Binary file not shown.
15 changes: 15 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Privacy Policy

By using this app (MultiplyMe), you agree with the privacy policy as described below in this document.

## Collected data
I do not collect, store or share any data through this app, be it personal data or not. Any and all data generated by the app stays on your phone and is not collected on any server, nor is it shared with third parties. The app also does not use any third party packages or extensions that collect any data, nor does it contain any ads.

## E-Mail
If you contact me via E-Mail, your name and E-Mail address is only used to reply to your specific inquiry. They will not be used for any marketing purposes.

## Contact
If you have any questions, suggestions or other remarks about this privacy policy or the app in general, you can contact me via the E-Mail address [email protected].

---
##### Last updated: 10.03.2023
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# MultiplyMe

A math practise app, originally developed to practise specifically multiplication tables.
A math practise app mainly developed for practising multiplication tables. This was a private project of mine from december 2021/january 2022 that I turned into a public repo and released on google play. It is also one of my first flutter projects and has (as of march 2023) not the most optimized codebase. Feel free to create a fork and expand the project to your own liking.

## Imprint
Since it is required by german law to create an imprint for any website or app, this app contains an entry for that in the settings. To avoid checking in personal data in a public repository, the app loads a markdown file from `assets/imprint.md` that is excluded through the `.gitignore`. You have to add an `imprint.md` file with at least one character, otherwise the app will not compile.
25 changes: 22 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion flutter.compileSdkVersion

Expand All @@ -34,18 +40,31 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.AnnoyingStudio.multiply_me"
minSdkVersion flutter.minSdkVersion
applicationId "com.JanneckFranke.multiply_me"
minSdkVersion 26
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
}
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.AnnoyingStudio.multiply_me">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="MultiplyMe"
android:name="${applicationName}"
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.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 modified android/app/src/main/res/mipmap-mdpi/ic_launcher.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 modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.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 modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.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 modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# assets
The assets folder in multiply_me is currently only used to house a markdown file containing the imprint for your app (`assets/imprint.md`). The imprint has to contain various information such as a full name, address, E-Mail address and/or phone number. This is required by German law for any website or app on a digital marketplace, which is why this file has to be here. When building the app, the imprint is included as an asset and its content is shown under Settings -> Imprint in the app. The file is not included in the git repository, to avoid checking in personal data. The `assets/imprint.md` file **has to** be here though, otherwise the app won't build!
3 changes: 0 additions & 3 deletions lib/classes/analytics_math_session.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import 'dart:developer';

import 'package:multiply_me/classes/analytics_math_task.dart';
import 'package:multiply_me/classes/math_task.dart';

class MathSession {
late DateTime sessionDate;
Expand Down
2 changes: 0 additions & 2 deletions lib/classes/analytics_math_task.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'package:flutter/services.dart';
import '../helpers/duration_converter.dart';
import "package:duration/duration.dart";

class AnalyticsMathTask {
late double firstFigure;
Expand Down
2 changes: 1 addition & 1 deletion lib/components/detail_analytics_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DetailAnalyticsScreen extends StatefulWidget {

class _DetailAnalyticsScreenState extends State<DetailAnalyticsScreen> {
List<AnalyticsMathTask> analyticsList = [];
Duration totalDuration = Duration();
Duration totalDuration = const Duration();

void finishSession() {
Navigator.of(context).pop();
Expand Down
6 changes: 0 additions & 6 deletions lib/components/finished_screen.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import 'dart:developer';
import "dart:convert";
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:multiply_me/classes/analytics_data.dart';
import 'package:multiply_me/classes/analytics_math_session.dart';
import 'package:multiply_me/classes/analytics_math_task.dart';
import "../helpers/json_utils.dart";
import 'package:multiply_me/classes/math_result.dart';
import 'package:multiply_me/helpers/save_file_loader.dart';
import 'package:multiply_me/main.dart';
import "package:flutter_gen/gen_l10n/app_localizations.dart";
import 'package:path_provider/path_provider.dart';

class FinishedScreen extends StatefulWidget {
const FinishedScreen({Key? key, required this.resultList}) : super(key: key);
Expand Down
88 changes: 47 additions & 41 deletions lib/components/practiseScreens/multiple_multiplication_tables.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:multiply_me/classes/math_task.dart';
import 'package:multiply_me/components/in_progress_screen.dart';

import "package:flutter_gen/gen_l10n/app_localizations.dart";

import '../../helpers/dialog_helper.dart';

class MultipleMultiplicationTables extends StatefulWidget {
const MultipleMultiplicationTables({Key? key}) : super(key: key);

Expand Down Expand Up @@ -35,52 +39,52 @@ class _MultipleMultiplicationTablesState
void startPractise(BuildContext context) {
var localization =
Localizations.of<AppLocalizations>(context, AppLocalizations);
if (rangeANumberController.text != "" &&
rangeBNumberController.text != "" &&
tables.isNotEmpty) {
double rangeA = double.parse(rangeANumberController.text);
double rangeB = double.parse(rangeBNumberController.text);

List<MathTask> taskItems = <MathTask>[];
double rangeA = -1;
double rangeB = -1;

for (double table in tables) {
for (double i = rangeA; i <= rangeB; i++) {
taskItems.add(MathTask(i, table, "×"));
}
}
if (rangeANumberController.text == "" ||
rangeBNumberController.text == "" ||
tables.isEmpty) {
DialogHelper.showInfoDialog(
context,
localization!.multiplicationTableErrorHeadline,
localization.multiplicationTableErrorFillInAll,
);
return;
}

if (randomizeValue) {
taskItems.shuffle();
}
rangeA = double.parse(rangeANumberController.text);
rangeB = double.parse(rangeBNumberController.text);

Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => InProgressScreen(
taskList: taskItems,
),
),
if (rangeA > rangeB) {
DialogHelper.showInfoDialog(
context,
localization!.multiplicationTableErrorHeadline,
localization.multiplicationTableErrorRangeAGreater,
);
} else {
showAlertBox(localization!.multiplicationTableErrorHeadline,
localization.multiplicationTableErrorNotEnoughInformation);
return;
}
}

/// Shows a simple alert with an "okay" button (no yes/no options, just for warnings!)
void showAlertBox(String title, String content) {
showDialog(
context: context,
builder: (BuildContext ctx) {
return AlertDialog(
title: Text(title),
content: Text(content),
actions: [
TextButton(
onPressed: () => {Navigator.pop(context)},
child: const Text("Okay"))
],
);
});
List<MathTask> taskItems = <MathTask>[];

for (double table in tables) {
for (double i = rangeA; i <= rangeB; i++) {
taskItems.add(MathTask(i, table, "×"));
}
}

if (randomizeValue) {
taskItems.shuffle();
}

Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => InProgressScreen(
taskList: taskItems,
),
),
);
}

/// Returns a list of cards for each element in the input
Expand Down Expand Up @@ -161,13 +165,15 @@ class _MultipleMultiplicationTablesState
color: Colors.white,
onPressed: () {
if (tableInputController.text == "") {
showAlertBox(
DialogHelper.showInfoDialog(
context,
localization.multiplicationTableErrorHeadline,
localization
.multiplicationTableErrorDidNotInputNumber);
} else if (tables.contains(
double.parse(tableInputController.text))) {
showAlertBox(
DialogHelper.showInfoDialog(
context,
localization.multiplicationTableErrorHeadline,
localization
.multiplicationTableErrorAlreadyAddedTable);
Expand Down
Loading

0 comments on commit df9a57c

Please sign in to comment.