From 5d346787c4d35908c4cbfa787ae4a894350fd4c1 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Thu, 25 Sep 2025 13:06:30 -0400 Subject: [PATCH] chore: make terms and conditions links work (#4141) --- lib/pangea/login/pages/login_options_view.dart | 7 +++++++ lib/pangea/login/pages/signup_view.dart | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lib/pangea/login/pages/login_options_view.dart b/lib/pangea/login/pages/login_options_view.dart index 57eeec9da..eb538b2b2 100644 --- a/lib/pangea/login/pages/login_options_view.dart +++ b/lib/pangea/login/pages/login_options_view.dart @@ -1,7 +1,10 @@ +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:url_launcher/url_launcher_string.dart'; +import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/l10n/l10n.dart'; import 'package:fluffychat/pages/login/login.dart'; import 'package:fluffychat/pangea/common/widgets/pangea_logo_svg.dart'; @@ -79,6 +82,10 @@ class LoginOptionsView extends StatelessWidget { decoration: TextDecoration.underline, color: theme.colorScheme.primary, ), + recognizer: TapGestureRecognizer() + ..onTap = () { + launchUrlString(AppConfig.termsOfServiceUrl); + }, ), TextSpan( text: diff --git a/lib/pangea/login/pages/signup_view.dart b/lib/pangea/login/pages/signup_view.dart index de4bcd9fa..a9fd8e8cb 100644 --- a/lib/pangea/login/pages/signup_view.dart +++ b/lib/pangea/login/pages/signup_view.dart @@ -1,9 +1,12 @@ // Flutter imports: +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:url_launcher/url_launcher_string.dart'; +import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/l10n/l10n.dart'; import 'package:fluffychat/pangea/common/widgets/pangea_logo_svg.dart'; import 'package:fluffychat/pangea/login/widgets/p_sso_button.dart'; @@ -91,6 +94,10 @@ class SignupPageView extends StatelessWidget { decoration: TextDecoration.underline, color: theme.colorScheme.primary, ), + recognizer: TapGestureRecognizer() + ..onTap = () { + launchUrlString(AppConfig.termsOfServiceUrl); + }, ), TextSpan( text: L10n.of(context)