Skip to content

Commit

Permalink
resolves #124 (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenhorn committed Jan 4, 2022
1 parent d267818 commit 81119b4
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/presentation/auth/auth_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class _AuthPageState extends State<AuthPage> {
child: Column(
children: [
SizedBox(
height: 470.0,
height: 520.0,
child: PageView(
controller: _pageController,
physics: const NeverScrollableScrollPhysics(),
Expand Down
61 changes: 61 additions & 0 deletions lib/presentation/auth/widgets/legal_notice.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

class LegalNotice extends StatelessWidget {
const LegalNotice({
Key? key,
}) : super(key: key);

@override
Widget build(BuildContext context) {
const textStyle = TextStyle(color: Color(0xFF666666));
return RichText(
textAlign: TextAlign.center,
text: TextSpan(
children: [
const TextSpan(
text: "By clicking the next button, you agree to CollAction’s ",
style: textStyle,
),
TextSpan(
style: textStyle.copyWith(decoration: TextDecoration.underline),
text: "terms & conditions",
recognizer: TapGestureRecognizer()
..onTap = () async {
const url = "https://www.collaction.org/terms";
if (await canLaunch(url)) {
await launch(
url,
forceSafariVC: false,
);
}
},
),
const TextSpan(
style: textStyle,
text: " and to our ",
),
TextSpan(
style: textStyle.copyWith(decoration: TextDecoration.underline),
text: "privacy policy",
recognizer: TapGestureRecognizer()
..onTap = () async {
const url = "https://www.collaction.org/privacy";
if (await canLaunch(url)) {
await launch(
url,
forceSafariVC: false,
);
}
},
),
const TextSpan(
style: textStyle,
text: ".",
),
],
),
);
}
}
3 changes: 3 additions & 0 deletions lib/presentation/auth/widgets/verify_phone.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import '../../../application/auth/auth_bloc.dart';
import '../../shared_widgets/phone_input.dart';
import '../../shared_widgets/rectangular_button.dart';
import 'legal_notice.dart';

class VerifyPhonePage extends StatefulWidget {
const VerifyPhonePage({Key? key}) : super(key: key);
Expand Down Expand Up @@ -69,6 +70,8 @@ class VerifyPhonePageState extends State<VerifyPhonePage> {
),
],
),
const SizedBox(height: 20),
const LegalNotice(),
],
);
},
Expand Down

0 comments on commit 81119b4

Please sign in to comment.