sign up page scroll fix
This commit is contained in:
@@ -12,6 +12,7 @@ class SignUpFormContent extends StatelessWidget {
|
|||||||
final bool autoValidateMode;
|
final bool autoValidateMode;
|
||||||
final VoidCallback onSignUp;
|
final VoidCallback onSignUp;
|
||||||
final VoidCallback onLogin;
|
final VoidCallback onLogin;
|
||||||
|
final double maxWidth = 500;
|
||||||
|
|
||||||
const SignUpFormContent({
|
const SignUpFormContent({
|
||||||
required this.formKey,
|
required this.formKey,
|
||||||
@@ -26,35 +27,33 @@ class SignUpFormContent extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) => Align(
|
Widget build(BuildContext context) => Align(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: const BoxConstraints(maxWidth: 500, maxHeight: 700),
|
constraints: BoxConstraints(maxWidth: maxWidth),
|
||||||
child: Card(
|
child: Card(
|
||||||
child: SingleChildScrollView(
|
child: Column(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
Row(
|
||||||
Row(
|
children: [
|
||||||
children: [
|
IconButton(
|
||||||
IconButton(
|
onPressed: onLogin,
|
||||||
onPressed: onLogin,
|
icon: Icon(Icons.arrow_back),
|
||||||
icon: Icon(Icons.arrow_back),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
ConstrainedForm(
|
||||||
ConstrainedForm(
|
formKey: formKey,
|
||||||
formKey: formKey,
|
autovalidateMode: autoValidateMode
|
||||||
autovalidateMode: autoValidateMode
|
? AutovalidateMode.onUserInteraction
|
||||||
? AutovalidateMode.onUserInteraction
|
: AutovalidateMode.disabled,
|
||||||
: AutovalidateMode.disabled,
|
children: [
|
||||||
children: [
|
SignUpFormFields(controllers: controllers),
|
||||||
SignUpFormFields(controllers: controllers),
|
SignUpButtonsRow(
|
||||||
SignUpButtonsRow(
|
onLogin: onLogin,
|
||||||
onLogin: onLogin,
|
signUp: onSignUp,
|
||||||
signUp: onSignUp,
|
isEnabled: true,
|
||||||
isEnabled: true,
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -7,16 +7,29 @@ class PageWithFooter extends StatelessWidget {
|
|||||||
final PreferredSizeWidget? appBar;
|
final PreferredSizeWidget? appBar;
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
||||||
const PageWithFooter({super.key, required this.child, this.appBar});
|
const PageWithFooter({
|
||||||
|
super.key,
|
||||||
|
required this.child,
|
||||||
|
this.appBar,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Scaffold(
|
Widget build(BuildContext context) => Scaffold(
|
||||||
appBar: appBar,
|
appBar: appBar,
|
||||||
body: Column(
|
body: LayoutBuilder(
|
||||||
children: [
|
builder: (context, constraints) => SingleChildScrollView(
|
||||||
Expanded(child: child),
|
child: ConstrainedBox(
|
||||||
FooterWidget(),
|
constraints: BoxConstraints(minHeight: constraints.maxHeight),
|
||||||
],
|
child: IntrinsicHeight(
|
||||||
),
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(child: child),
|
||||||
|
FooterWidget(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user