From 91e2f81692bfdb8bd172b416e77af1921c159761 Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Tue, 30 Jul 2024 14:11:15 +0200 Subject: [PATCH] size padding --- .../patient_manager/lib/pages/register.dart | 180 +++++++++--------- .../patient_manager/lib/pages/signin.dart | 166 ++++++++-------- 2 files changed, 175 insertions(+), 171 deletions(-) diff --git a/Frontend/patient_manager/lib/pages/register.dart b/Frontend/patient_manager/lib/pages/register.dart index 331ea6e7..e4530a05 100644 --- a/Frontend/patient_manager/lib/pages/register.dart +++ b/Frontend/patient_manager/lib/pages/register.dart @@ -229,101 +229,103 @@ class _RegisterState extends State { child: Center( child: SingleChildScrollView( physics: const BouncingScrollPhysics(), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - //logo - Icon( - Icons.lock, - size: 100, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - //spacer - const SizedBox(height: 10), - //Heading - Text( - 'Register', - style: TextStyle( - fontSize: 25, - fontWeight: FontWeight.bold, + child: Padding( + padding: const EdgeInsets.all(25.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + //logo + Icon( + Icons.lock, + size: 100, color: MzanziInnovationHub.of(context)! .theme .secondaryColor(), ), - ), - //spacer - const SizedBox(height: 25), - //email input - SizedBox( - width: 500.0, - child: MyTextField( - controller: emailController, - hintText: 'Email', - editable: true, - required: true, + //spacer + const SizedBox(height: 10), + //Heading + Text( + 'Register', + style: TextStyle( + fontSize: 25, + fontWeight: FontWeight.bold, + color: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + ), ), - ), - //spacer - const SizedBox(height: 25), - //password input - SizedBox( - width: 500.0, - child: MyPassField( - controller: passwordController, - hintText: 'Password', - required: true, + //spacer + const SizedBox(height: 25), + //email input + SizedBox( + width: 500.0, + child: MyTextField( + controller: emailController, + hintText: 'Email', + editable: true, + required: true, + ), ), - ), - //spacer - const SizedBox(height: 25), - //password input - SizedBox( - width: 500.0, - child: MyPassField( - controller: confirmPasswordController, - hintText: 'Confirm Password', - required: true, + //spacer + const SizedBox(height: 10), + //password input + SizedBox( + width: 500.0, + child: MyPassField( + controller: passwordController, + hintText: 'Password', + required: true, + ), ), - ), - //spacer - const SizedBox(height: 10), - // sign up button - SizedBox( - width: 500.0, - height: 100.0, - child: MyButton( - buttonText: "Sign Up", - buttonColor: MzanziInnovationHub.of(context)! - .theme - .secondaryColor(), - textColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - onTap: () async { - if (emailController.text.isEmpty || - passwordController.text.isEmpty) { - showDialog( - context: context, - builder: (context) { - return const MyErrorMessage( - errorType: "Input Error"); - }, - ); - } else { - await signUserUp(); - if (successfulSignUp) { - Navigator.of(context).pushNamed('/homme'); + //spacer + const SizedBox(height: 10), + //password input + SizedBox( + width: 500.0, + child: MyPassField( + controller: confirmPasswordController, + hintText: 'Confirm Password', + required: true, + ), + ), + //spacer + const SizedBox(height: 10), + // sign up button + SizedBox( + width: 500.0, + height: 100.0, + child: MyButton( + buttonText: "Sign Up", + buttonColor: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + textColor: MzanziInnovationHub.of(context)! + .theme + .primaryColor(), + onTap: () async { + if (emailController.text.isEmpty || + passwordController.text.isEmpty) { + showDialog( + context: context, + builder: (context) { + return const MyErrorMessage( + errorType: "Input Error"); + }, + ); + } else { + await signUserUp(); + if (successfulSignUp) { + Navigator.of(context).pushNamed('/homme'); + } } - } - }, + }, + ), ), - ), - //register text - SizedBox( - width: 450.0, - height: 100.0, - child: Padding( - padding: const EdgeInsets.all(30.0), + //register text + SizedBox( + width: 500.0, + //height: 100.0, child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ @@ -349,9 +351,9 @@ class _RegisterState extends State { ) ], ), - ), - ) - ], + ) + ], + ), ), ), ), diff --git a/Frontend/patient_manager/lib/pages/signin.dart b/Frontend/patient_manager/lib/pages/signin.dart index 1be62832..a0536e64 100644 --- a/Frontend/patient_manager/lib/pages/signin.dart +++ b/Frontend/patient_manager/lib/pages/signin.dart @@ -120,93 +120,95 @@ class _SignInState extends State { child: Center( child: SingleChildScrollView( physics: const BouncingScrollPhysics(), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - //logo - Icon( - Icons.lock, - size: 100, - color: - MzanziInnovationHub.of(context)!.theme.secondaryColor(), - ), - //spacer - const SizedBox(height: 10), - //Heading - Text( - 'Sign In', - style: TextStyle( - fontSize: 25, - fontWeight: FontWeight.bold, + child: Padding( + padding: const EdgeInsets.all(25.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + //logo + Icon( + Icons.lock, + size: 100, color: MzanziInnovationHub.of(context)! .theme .secondaryColor(), ), - ), - //spacer - const SizedBox(height: 25), - //email input - SizedBox( - width: 500.0, - child: MyTextField( - controller: emailController, - hintText: 'Email', - editable: true, - required: true, + //spacer + const SizedBox(height: 10), + //Heading + Text( + 'Sign In', + style: TextStyle( + fontSize: 25, + fontWeight: FontWeight.bold, + color: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + ), ), - ), - //spacer - const SizedBox(height: 25), - //password input - SizedBox( - width: 500.0, - child: MyPassField( - controller: passwordController, - hintText: 'Password', - required: true, + //spacer + const SizedBox(height: 25), + //email input + SizedBox( + width: 500.0, + child: MyTextField( + controller: emailController, + hintText: 'Email', + editable: true, + required: true, + ), ), - ), - //spacer - const SizedBox(height: 10), - // sign in button - SizedBox( - width: 500.0, - height: 100.0, - child: MyButton( - buttonText: "Sign In", - buttonColor: MzanziInnovationHub.of(context)! - .theme - .secondaryColor(), - textColor: - MzanziInnovationHub.of(context)!.theme.primaryColor(), - onTap: () async { - if (emailController.text.isEmpty || - passwordController.text.isEmpty) { - showDialog( - context: context, - builder: (context) { - return const MyErrorMessage( - errorType: "Input Error"); - }, - ); - } else { - await signUserIn(); - //print(successfulSignIn); - if (successfulSignIn) { - Navigator.of(context).pushNamed('/home'); + //spacer + const SizedBox(height: 10), + //password input + SizedBox( + width: 500.0, + child: MyPassField( + controller: passwordController, + hintText: 'Password', + required: true, + ), + ), + //spacer + const SizedBox(height: 10), + // sign in button + SizedBox( + width: 500.0, + height: 100.0, + child: MyButton( + buttonText: "Sign In", + buttonColor: MzanziInnovationHub.of(context)! + .theme + .secondaryColor(), + textColor: MzanziInnovationHub.of(context)! + .theme + .primaryColor(), + onTap: () async { + if (emailController.text.isEmpty || + passwordController.text.isEmpty) { + showDialog( + context: context, + builder: (context) { + return const MyErrorMessage( + errorType: "Input Error"); + }, + ); + } else { + await signUserIn(); + //print(successfulSignIn); + if (successfulSignIn) { + Navigator.of(context).pushNamed('/home'); + } } - } - }, + }, + ), ), - ), - //spacer - //const SizedBox(height: 30), - //register text - SizedBox( - width: 450.0, - height: 100.0, - child: Padding( - padding: const EdgeInsets.all(15.0), + //spacer + //const SizedBox(height: 30), + //register text + SizedBox( + width: 500.0, + //height: 100.0, child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ @@ -237,9 +239,9 @@ class _SignInState extends State { ), ], ), - ), - ) - ], + ) + ], + ), ), ), ),