diff --git a/lib/main.dart b/lib/main.dart index a0417f2..e30182d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,6 +19,7 @@ import 'package:pizzaplanner/pages/pizza_events_page.dart'; import 'package:hive/hive.dart'; import 'package:hive_flutter/hive_flutter.dart'; +import 'package:pizzaplanner/pages/privacy_policy_page.dart'; import 'package:pizzaplanner/pages/recipe_page.dart'; import 'package:pizzaplanner/pages/recipe_step_instruction_page.dart'; import 'package:pizzaplanner/pages/recipes_page.dart'; @@ -204,6 +205,9 @@ class RouteGenerator { case AddRecipeURLPage.route: { return MaterialPageRoute(builder: (context) => AddRecipeURLPage(settings.arguments as String?)); } + case PrivacyPolicyPage.route: { + return MaterialPageRoute(builder: (context) => PrivacyPolicyPage()); + } default: { return MaterialPageRoute(builder: (context) => PizzaEventsPage()); } diff --git a/lib/pages/nav_drawer.dart b/lib/pages/nav_drawer.dart index e77bf80..68629d4 100644 --- a/lib/pages/nav_drawer.dart +++ b/lib/pages/nav_drawer.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:fluttericon/font_awesome5_icons.dart'; -import 'package:pizzaplanner/entities/pizza_event.dart'; import 'package:pizzaplanner/pages/archived_pizza_event_page.dart'; import 'package:pizzaplanner/pages/pizza_events_page.dart'; +import 'package:pizzaplanner/pages/privacy_policy_page.dart'; import 'package:pizzaplanner/pages/recipes_page.dart'; class NavDrawer extends StatelessWidget { @@ -55,6 +55,18 @@ class NavDrawer extends StatelessWidget { Navigator.pushNamed(context, ArchivedPizzaEventsPage.route); }, ), + Expanded(child: Container()), + ListTile( + leading: const Icon(FontAwesome5.file_contract), + title: const Text("Privacy Policy"), + onTap: () { + Navigator.pop(context); + if (currentRouteName == ArchivedPizzaEventsPage.route){ + return; + } + Navigator.pushNamed(context, PrivacyPolicyPage.route); + }, + ), ] ) ); diff --git a/lib/pages/privacy_policy_page.dart b/lib/pages/privacy_policy_page.dart new file mode 100644 index 0000000..7c62f48 --- /dev/null +++ b/lib/pages/privacy_policy_page.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_markdown/flutter_markdown.dart'; +import 'package:pizzaplanner/pages/scaffold.dart'; + +class PrivacyPolicyPage extends StatelessWidget { + static const String route = "/privacy_policy"; + + static const String privacyPolicy = """ +## PizzaPlanner: Privacy policy + +Welcome to the Pizza Planner app for Android! + +This is an open source Android app developed by me. The source code is available on my Gitea repository under the MIT license; the app is also available on Google Play. + +I know how irritating it is when apps collect your data without your knowledge. + +I have not programmed this app to collect any personally identifiable information. All data (app preferences (like theme, etc.) and alarms) created by the you is stored on your device only, and can be simply erased by clearing the app's data or uninstalling it. + +If you find any security vulnerability that has been inadvertently caused by me, or have any question regarding how the app protects your privacy, please send me an email and I will surely try to fix it/help you. + +Yours sincerely, +David +david@broodjeaap.net +https://gitea.broodjeaap.net/broodjeaap/PizzaPlanner +"""; + + @override + Widget build(BuildContext context){ + return PizzaPlannerScaffold( + title: const Text("Pick Recipe"), + body: const Markdown(data: privacyPolicy) + ); + } +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index ef35bfb..7400370 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 +version: 1.1.0 environment: sdk: ">=2.12.0 <3.0.0"