Skip to content

Commit

Permalink
Add TOS and update privacy policy in website. (#1503)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-Sander authored Apr 22, 2024
1 parent d5af4db commit e99a098
Show file tree
Hide file tree
Showing 7 changed files with 339 additions and 318 deletions.
25 changes: 14 additions & 11 deletions lib/sharezone_widgets/lib/src/theme_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import 'dart:convert';

// ignore: import_of_legacy_library_into_null_safe
import 'package:analytics/analytics.dart';
import 'package:analytics/null_analytics_backend.dart';
import 'package:flutter/material.dart';
import 'package:key_value_store/in_memory_key_value_store.dart';
import 'package:key_value_store/key_value_store.dart';

/// [ThemeBrightness] adds a "system" value that is missing in the Flutter
Expand Down Expand Up @@ -79,29 +81,30 @@ class ThemeSettings extends ChangeNotifier {
static const currentBrightnessCacheKey = 'currentBrightnessCacheKey';

ThemeSettings({
required KeyValueStore keyValueStore,
required Analytics analytics,
KeyValueStore? keyValueStore,
Analytics? analytics,

/// The value assigned to [textScalingFactor] if no other value is cached.
required double defaultTextScalingFactor,
double defaultTextScalingFactor = 1.0,

/// The value assigned to [visualDensity] if no other value is cached.
required VisualDensitySetting defaultVisualDensity,
VisualDensitySetting? defaultVisualDensity,

/// The value assigned to [themeBrightness] if no other value is cached.
required ThemeBrightness defaultThemeBrightness,
}) : _keyValueStore = keyValueStore,
_analytics = analytics {
ThemeBrightness defaultThemeBrightness = ThemeBrightness.system,
}) : _keyValueStore = keyValueStore ?? InMemoryKeyValueStore(),
_analytics = analytics ?? Analytics(NullAnalyticsBackend()) {
_textScalingFactor =
keyValueStore.tryGetDouble(currentTextScalingFactorCacheKey) ??
_keyValueStore.tryGetDouble(currentTextScalingFactorCacheKey) ??
defaultTextScalingFactor;

_visualDensitySetting = keyValueStore
_visualDensitySetting = _keyValueStore
.tryGetString(currentVisualDensityCacheKey)
.toVisualDensity() ??
defaultVisualDensity;
defaultVisualDensity ??
VisualDensitySetting.adaptivePlatformDensity();

_themeBrightness = keyValueStore
_themeBrightness = _keyValueStore
.tryGetString(currentBrightnessCacheKey)
.toThemeBrightness() ??
defaultThemeBrightness;
Expand Down
1 change: 1 addition & 0 deletions licenses_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ packageLicenseOverride:
sharezone_utils: EUPL-1.2-or-later
sharezone_widgets: EUPL-1.2-or-later
stripe_checkout_session: EUPL-1.2-or-later
legal: EUPL-1.2-or-later
time: EUPL-1.2-or-later
url_launcher_extended: EUPL-1.2-or-later
user: EUPL-1.2-or-later
Expand Down
6 changes: 4 additions & 2 deletions website/lib/footer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:go_router/go_router.dart';
import 'package:legal/legal.dart';
import 'package:sharezone_website/legal/imprint_page.dart';
import 'package:sharezone_website/legal/privacy_policy.dart';
import 'package:sharezone_website/support_page.dart';
import 'package:sharezone_website/utils.dart';

Expand Down Expand Up @@ -205,7 +205,9 @@ class _FooterLegal extends StatelessWidget {
title: "Rechtliches",
links: [
_FooterAction("Impressum", tag: ImprintPage.tag),
_FooterAction("Datenschutz", tag: PrivacyPolicyPage.tag),
_FooterAction("Allgemeine Nutzungsbedingungen (ANB)",
tag: TermsOfServicePage.tag),
_FooterAction("Datenschutzerklärung", tag: PrivacyPolicyPage.tag),
],
);
}
Expand Down
291 changes: 0 additions & 291 deletions website/lib/legal/privacy_policy.dart

This file was deleted.

Loading

0 comments on commit e99a098

Please sign in to comment.