From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox_login_manager v2 2/2] ui: settings: add privacy policy url link in settings screen
Date: Fri, 4 Jul 2025 17:26:54 +0200 [thread overview]
Message-ID: <20250704152654.21221-3-s.shaji@proxmox.com> (raw)
In-Reply-To: <20250704152654.21221-1-s.shaji@proxmox.com>
According to Apple's App Store review guidelines all apps must include a
link to their privacy policy within the App [0]. To fix the issue add a
new list item in the settings screen that will allow users to access the
privacy policy.
[0] - https://developer.apple.com/app-store/review/guidelines/#legal
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
changes since v1:
- Move all .lock file changes to another patch.
- Remove wrapper class around link constants.
- Remove all custom widgets and use flutter default widgets
- Remove result class
note: The `flutter pub get` command triggered the .lock
file change.
lib/constants/pve_links.dart | 2 +
lib/proxmox_general_settings_form.dart | 28 +++++++++++
lib/utils/pve_url_launcher_util.dart | 9 ++++
pubspec.lock | 66 +++++++++++++++++++++++++-
pubspec.yaml | 1 +
5 files changed, 105 insertions(+), 1 deletion(-)
create mode 100644 lib/constants/pve_links.dart
create mode 100644 lib/utils/pve_url_launcher_util.dart
diff --git a/lib/constants/pve_links.dart b/lib/constants/pve_links.dart
new file mode 100644
index 0000000..4dc0eaf
--- /dev/null
+++ b/lib/constants/pve_links.dart
@@ -0,0 +1,2 @@
+const String privacyPolicyUrl =
+ 'https://pve.proxmox.com/wiki/Proxmox_VE_Mobile_Companion_Data_Protection';
diff --git a/lib/proxmox_general_settings_form.dart b/lib/proxmox_general_settings_form.dart
index cb0afef..4f95641 100644
--- a/lib/proxmox_general_settings_form.dart
+++ b/lib/proxmox_general_settings_form.dart
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
+import 'package:proxmox_login_manager/constants/pve_links.dart';
import 'package:proxmox_login_manager/proxmox_general_settings_model.dart';
+import 'package:proxmox_login_manager/utils/pve_url_launcher_util.dart';
class ProxmoxGeneralSettingsForm extends StatefulWidget {
const ProxmoxGeneralSettingsForm({super.key});
@@ -45,6 +47,32 @@ class _ProxmoxGeneralSettingsFormState
ProxmoxGeneralSettingsModel.fromLocalStorage();
});
},
+ ),
+ const ListTile(
+ title: Text(
+ 'LEGAL',
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ ),
+ ),
+ ),
+ ListTile(
+ leading: const Icon(Icons.privacy_tip_outlined),
+ title: const Text('Privacy Policy'),
+ trailing: const Icon(Icons.open_in_new),
+ onTap: () {
+ try {
+ tryLaunchUrl(Uri.parse(privacyPolicyUrl));
+ } catch (_) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(
+ content: Text(
+ 'Could not launch privacy policy',
+ ),
+ ),
+ );
+ }
+ },
)
],
),
diff --git a/lib/utils/pve_url_launcher_util.dart b/lib/utils/pve_url_launcher_util.dart
new file mode 100644
index 0000000..0ea7cbe
--- /dev/null
+++ b/lib/utils/pve_url_launcher_util.dart
@@ -0,0 +1,9 @@
+import 'package:url_launcher/url_launcher.dart';
+
+Future<bool> tryLaunchUrl(Uri url) async {
+ if (await canLaunchUrl(url)) {
+ return await launchUrl(url);
+ } else {
+ throw 'Could not launch $url';
+ }
+}
diff --git a/pubspec.lock b/pubspec.lock
index 2ceaa65..6163a50 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -636,6 +636,70 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.2"
+ url_launcher:
+ dependency: "direct main"
+ description:
+ name: url_launcher
+ sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.1"
+ url_launcher_android:
+ dependency: transitive
+ description:
+ name: url_launcher_android
+ sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.16"
+ url_launcher_ios:
+ dependency: transitive
+ description:
+ name: url_launcher_ios
+ sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.3"
+ url_launcher_linux:
+ dependency: transitive
+ description:
+ name: url_launcher_linux
+ sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.1"
+ url_launcher_macos:
+ dependency: transitive
+ description:
+ name: url_launcher_macos
+ sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.2"
+ url_launcher_platform_interface:
+ dependency: transitive
+ description:
+ name: url_launcher_platform_interface
+ sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
+ url_launcher_web:
+ dependency: transitive
+ description:
+ name: url_launcher_web
+ sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.1"
+ url_launcher_windows:
+ dependency: transitive
+ description:
+ name: url_launcher_windows
+ sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.4"
vector_math:
dependency: transitive
description:
@@ -702,4 +766,4 @@ packages:
version: "3.1.2"
sdks:
dart: ">=3.7.0-0 <4.0.0"
- flutter: ">=3.19.0"
+ flutter: ">=3.27.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 99f9870..1e48217 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -14,6 +14,7 @@ dependencies:
biometric_storage: ^5.0.0
built_value: ^8.4.1
built_collection: ^5.0.0
+ url_launcher: ^6.3.1
proxmox_dart_api_client:
path: ../proxmox_dart_api_client
--
2.39.5 (Apple Git-154)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-04 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 15:26 [pve-devel] [PATCH proxmox_login_manager v2 0/2] Add privacy policy url and update .lock file Shan Shaji
2025-07-04 15:26 ` [pve-devel] [PATCH proxmox_login_manager v2 1/2] chore: update pubspec.lock file to support new flutter version Shan Shaji
2025-07-04 15:26 ` Shan Shaji [this message]
2025-07-22 11:54 ` [pve-devel] [PATCH proxmox_login_manager v2 0/2] Add privacy policy url and update .lock file Shan Shaji
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250704152654.21221-3-s.shaji@proxmox.com \
--to=s.shaji@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.