From c962ac7cbd00cfe1afb03b63865491737d750c5e Mon Sep 17 00:00:00 2001 From: Arseni Date: Tue, 10 Feb 2026 17:41:52 +0300 Subject: [PATCH] sign up page scroll fix --- .../pweb/lib/pages/signup/form/content.dart | 55 +++++++++---------- frontend/pweb/lib/pages/with_footer.dart | 29 +++++++--- 2 files changed, 48 insertions(+), 36 deletions(-) diff --git a/frontend/pweb/lib/pages/signup/form/content.dart b/frontend/pweb/lib/pages/signup/form/content.dart index 7767adbf..f3f9dada 100644 --- a/frontend/pweb/lib/pages/signup/form/content.dart +++ b/frontend/pweb/lib/pages/signup/form/content.dart @@ -12,6 +12,7 @@ class SignUpFormContent extends StatelessWidget { final bool autoValidateMode; final VoidCallback onSignUp; final VoidCallback onLogin; + final double maxWidth = 500; const SignUpFormContent({ required this.formKey, @@ -26,35 +27,33 @@ class SignUpFormContent extends StatelessWidget { Widget build(BuildContext context) => Align( alignment: Alignment.center, child: ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 500, maxHeight: 700), + constraints: BoxConstraints(maxWidth: maxWidth), child: Card( - child: SingleChildScrollView( - child: Column( - children: [ - Row( - children: [ - IconButton( - onPressed: onLogin, - icon: Icon(Icons.arrow_back), - ), - ], - ), - ConstrainedForm( - formKey: formKey, - autovalidateMode: autoValidateMode - ? AutovalidateMode.onUserInteraction - : AutovalidateMode.disabled, - children: [ - SignUpFormFields(controllers: controllers), - SignUpButtonsRow( - onLogin: onLogin, - signUp: onSignUp, - isEnabled: true, - ), - ], - ), - ], - ), + child: Column( + children: [ + Row( + children: [ + IconButton( + onPressed: onLogin, + icon: Icon(Icons.arrow_back), + ), + ], + ), + ConstrainedForm( + formKey: formKey, + autovalidateMode: autoValidateMode + ? AutovalidateMode.onUserInteraction + : AutovalidateMode.disabled, + children: [ + SignUpFormFields(controllers: controllers), + SignUpButtonsRow( + onLogin: onLogin, + signUp: onSignUp, + isEnabled: true, + ), + ], + ), + ], ), ), ), diff --git a/frontend/pweb/lib/pages/with_footer.dart b/frontend/pweb/lib/pages/with_footer.dart index f3f2ae8c..d96612d8 100644 --- a/frontend/pweb/lib/pages/with_footer.dart +++ b/frontend/pweb/lib/pages/with_footer.dart @@ -7,16 +7,29 @@ class PageWithFooter extends StatelessWidget { final PreferredSizeWidget? appBar; final Widget child; - const PageWithFooter({super.key, required this.child, this.appBar}); + const PageWithFooter({ + super.key, + required this.child, + this.appBar, + }); @override Widget build(BuildContext context) => Scaffold( appBar: appBar, - body: Column( - children: [ - Expanded(child: child), - FooterWidget(), - ], - ), + body: LayoutBuilder( + builder: (context, constraints) => SingleChildScrollView( + child: ConstrainedBox( + constraints: BoxConstraints(minHeight: constraints.maxHeight), + child: IntrinsicHeight( + child: Column( + children: [ + Expanded(child: child), + FooterWidget(), + ], + ), + ), + ), + ), + ), ); -} +} \ No newline at end of file