From 4289a6a4c492877eb639e4afd95fa8dc7e7a63a8 Mon Sep 17 00:00:00 2001 From: Ox Cart Date: Sun, 15 Oct 2023 14:59:06 -0500 Subject: [PATCH] Allow privacy disclosure to scroll on small screens, closes getlantern/engineering#474 --- lib/account/privacy_disclosure.dart | 52 ++++++++++++++++------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/lib/account/privacy_disclosure.dart b/lib/account/privacy_disclosure.dart index c7fac560c..4e15b7598 100644 --- a/lib/account/privacy_disclosure.dart +++ b/lib/account/privacy_disclosure.dart @@ -1,38 +1,44 @@ import 'package:lantern/common/common.dart'; class PrivacyDisclosure extends StatelessWidget { + const PrivacyDisclosure({super.key}); + @override Widget build(BuildContext context) { return FullScreenDialog( widget: Padding( - padding: EdgeInsetsDirectional.only( - start: 33, end: 33), + padding: const EdgeInsetsDirectional.only(start: 33, end: 33), + child: SingleChildScrollView( child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - margin: const EdgeInsetsDirectional.only(top: 38), + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: const EdgeInsetsDirectional.only(top: 38), child: CText( 'privacy_disclosure_title'.i18n, style: tsSubtitle1.copiedWith(fontSize: 24.0), - )), - Padding( - padding: EdgeInsetsDirectional.only(top: 24, bottom: 24), - child: CText( - 'privacy_disclosure_body'.i18n, - style: tsBody2.copiedWith(fontSize: 14.0, lineHeight: 24.0), - ), ), - const Spacer(), - Container( - margin: const EdgeInsetsDirectional.only(bottom: 38), - child: Button( - width: 200, - text: 'privacy_disclosure_accept'.i18n, - onPressed: () async => await sessionModel.acceptTerms(), - )), - ])), + ), + Padding( + padding: const EdgeInsetsDirectional.only(top: 24, bottom: 24), + child: CText( + 'privacy_disclosure_body'.i18n, + style: tsBody2.copiedWith(fontSize: 14.0, lineHeight: 24.0), + ), + ), + Container( + margin: const EdgeInsetsDirectional.only(bottom: 38), + child: Button( + width: 200, + text: 'privacy_disclosure_accept'.i18n, + onPressed: () async => await sessionModel.acceptTerms(), + ), + ), + ], + ), + ), + ), ); } }