mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-26 12:58:51 +00:00
Add links to privacy policy and terms of use of the terms
This commit is contained in:
parent
c2ce5ca05f
commit
95a38e9e8d
@ -27,6 +27,7 @@ class ServerConfigurationHelper {
|
||||
minSupportedMobileVersion:
|
||||
Version.parse(response["min_supported_mobile_version"]),
|
||||
termsURL: response["terms_url"],
|
||||
privacyPolicyURL: response["privacy_policy_url"],
|
||||
playStoreURL: response["play_store_url"],
|
||||
androidDirectDownloadURL: response["android_direct_download_url"],
|
||||
notificationsPolicy: NotificationsPolicy(
|
||||
|
@ -135,6 +135,7 @@ class AccountInformationPolicy {
|
||||
class ServerConfig {
|
||||
final Version minSupportedMobileVersion;
|
||||
final String termsURL;
|
||||
final String privacyPolicyURL;
|
||||
final String playStoreURL;
|
||||
final String androidDirectDownloadURL;
|
||||
final NotificationsPolicy notificationsPolicy;
|
||||
@ -146,6 +147,7 @@ class ServerConfig {
|
||||
const ServerConfig({
|
||||
@required this.minSupportedMobileVersion,
|
||||
@required this.termsURL,
|
||||
@required this.privacyPolicyURL,
|
||||
@required this.playStoreURL,
|
||||
@required this.androidDirectDownloadURL,
|
||||
@required this.notificationsPolicy,
|
||||
@ -155,6 +157,7 @@ class ServerConfig {
|
||||
@required this.accountInformationPolicy,
|
||||
}) : assert(minSupportedMobileVersion != null),
|
||||
assert(termsURL != null),
|
||||
assert(privacyPolicyURL != null),
|
||||
assert(playStoreURL != null),
|
||||
assert(androidDirectDownloadURL != null),
|
||||
assert(notificationsPolicy != null),
|
||||
|
@ -1,10 +1,12 @@
|
||||
import 'package:comunic/helpers/preferences_helper.dart';
|
||||
import 'package:comunic/helpers/server_config_helper.dart';
|
||||
import 'package:comunic/ui/widgets/async_screen_widget.dart';
|
||||
import 'package:comunic/ui/widgets/settings/header_spacer_section.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:settings_ui/settings_ui.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
/// Application settings
|
||||
///
|
||||
@ -57,6 +59,14 @@ class _ApplicationSettingsState extends State<ApplicationSettings> {
|
||||
SettingsSection _buildGeneralSection() => SettingsSection(
|
||||
title: tr("General"),
|
||||
tiles: [
|
||||
SettingsTile(
|
||||
title: tr("Privacy policy"),
|
||||
onPressed: (c) => launch(srvConfig.privacyPolicyURL),
|
||||
),
|
||||
SettingsTile(
|
||||
title: tr("Terms"),
|
||||
onPressed: (c) => launch(srvConfig.termsURL),
|
||||
),
|
||||
SettingsTile(
|
||||
title: tr("About this application"),
|
||||
subtitle: tr("Learn more about us"),
|
||||
|
Loading…
Reference in New Issue
Block a user