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