app: privacy policy link in the settings sheet

- new lib/src/ui/links.dart holds kPrivacyPolicyUrl (single source of truth for
  the app, the store listing and the compliance docs)
- settings sheet: "Datenschutzerklaerung" tile opens the policy in the browser
  via url_launcher; manifest grown a <queries> VIEW/https intent so Android 11+
  can resolve it
- verified on device: tap sends ACTION_VIEW for the URL and Chrome comes up
- guard: tools/build_release.sh aborts while links.dart still contains the
  example.invalid placeholder, so a release cannot ship without a policy URL
- docs: compliance row updated (in-app entry done, only the public URL missing)
This commit is contained in:
2026-10-25 03:26:24 +01:00
parent 43b3edd11e
commit 2ed3ee0ea1
8 changed files with 109 additions and 1 deletions
@@ -44,6 +44,12 @@
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<!-- url_launcher: needed on Android 11+ to resolve the browser for the
privacy policy link. -->
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="https"/>
</intent>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
+16
View File
@@ -3,6 +3,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart';
import 'src/ads/ads_service.dart';
import 'src/game/iron_arc_game.dart';
@@ -10,6 +11,7 @@ import 'src/native/native_match.dart';
import 'src/net/api_client.dart';
import 'src/net/match_session.dart';
import 'src/net/offline_queue.dart';
import 'src/ui/links.dart';
import 'src/ui/splash_screen.dart';
import 'src/ui/widgets.dart';
@@ -183,6 +185,20 @@ class _MatchScreenState extends State<MatchScreen> {
if (mounted) _toast('Consent: ${_ads.consentLabel}');
},
),
ListTile(
leading: const Icon(Icons.description_outlined),
title: const Text('Datenschutzerklärung'),
subtitle: const Text('Öffnet die Webseite'),
trailing: const Icon(Icons.open_in_new, size: 18),
onTap: () async {
Navigator.pop(sheetContext);
final ok = await launchUrl(
Uri.parse(kPrivacyPolicyUrl),
mode: LaunchMode.externalApplication,
);
if (!ok && mounted) _toast('Keine App zum Öffnen gefunden');
},
),
ListTile(
leading: const Icon(Icons.campaign_outlined),
title: const Text('Werbe-Status'),
+11
View File
@@ -0,0 +1,11 @@
/// External links. Single source of truth: the settings sheet, the store
/// listing and the compliance docs all quote these strings.
///
/// The privacy policy URL must stay publicly reachable without login - Play
/// rejects listings that point at a gated page, and AdMob shows it inside the
/// consent form. `tools/build_release.sh` refuses to build while the
/// placeholder below is still in place.
const String kPrivacyPolicyUrl = 'https://example.invalid/iron-arc/privacy';
/// Placeholder marker used by the release guard.
const String kPrivacyPolicyPlaceholder = 'example.invalid';
+64
View File
@@ -389,6 +389,70 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: e8cc955c97e06df9879140a1fe301f3d493f01b7c62dec7f46834be31d7e9fda
url: "https://pub.dev"
source: hosted
version: "6.3.3"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "611e87fb320b70d1dd721dc46af89c98aceccea9b31fde49e084591414e0c610"
url: "https://pub.dev"
source: hosted
version: "6.3.33"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "8faa1aab294f1ab4040b43660c887b0418d5fa4f0cffef76a484e6aa1092eb4a"
url: "https://pub.dev"
source: hosted
version: "6.4.2"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: "10f86fef4c2c43563fa6c211ff9cf757adf4d3ab762c56bd430664a947d70cd0"
url: "https://pub.dev"
source: hosted
version: "3.2.3"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "5e835a3b869c2d70325349c81c5a45c28e20791265b67b2669da6b08c5cd5201"
url: "https://pub.dev"
source: hosted
version: "3.2.6"
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: "85c81589622fbc87c1c683aaea164d3604a7777495a79d91e39ffcdec39ddb34"
url: "https://pub.dev"
source: hosted
version: "2.4.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "6c5ad3f22cd4c38e089b81963b3cd7bb83b111b2df5dce008bb066162f42e429"
url: "https://pub.dev"
source: hosted
version: "3.1.6"
vector_math:
dependency: transitive
description:
+1
View File
@@ -39,6 +39,7 @@ dependencies:
http: ^1.6.0
shared_preferences: ^2.5.6
google_mobile_ads: ^9.2.0
url_launcher: ^6.3.0
dev_dependencies:
flutter_test: