size padding

This commit is contained in:
2024-07-30 14:11:15 +02:00
parent 2b5019c53f
commit 91e2f81692
2 changed files with 175 additions and 171 deletions

View File

@@ -229,101 +229,103 @@ class _RegisterState extends State<Register> {
child: Center( child: Center(
child: SingleChildScrollView( child: SingleChildScrollView(
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
child: Column( child: Padding(
mainAxisAlignment: MainAxisAlignment.center, padding: const EdgeInsets.all(25.0),
children: [ child: Column(
//logo mainAxisAlignment: MainAxisAlignment.center,
Icon( children: [
Icons.lock, //logo
size: 100, Icon(
color: Icons.lock,
MzanziInnovationHub.of(context)!.theme.secondaryColor(), size: 100,
),
//spacer
const SizedBox(height: 10),
//Heading
Text(
'Register',
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)! color: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .secondaryColor(),
), ),
), //spacer
//spacer const SizedBox(height: 10),
const SizedBox(height: 25), //Heading
//email input Text(
SizedBox( 'Register',
width: 500.0, style: TextStyle(
child: MyTextField( fontSize: 25,
controller: emailController, fontWeight: FontWeight.bold,
hintText: 'Email', color: MzanziInnovationHub.of(context)!
editable: true, .theme
required: true, .secondaryColor(),
),
), ),
), //spacer
//spacer const SizedBox(height: 25),
const SizedBox(height: 25), //email input
//password input SizedBox(
SizedBox( width: 500.0,
width: 500.0, child: MyTextField(
child: MyPassField( controller: emailController,
controller: passwordController, hintText: 'Email',
hintText: 'Password', editable: true,
required: true, required: true,
),
), ),
), //spacer
//spacer const SizedBox(height: 10),
const SizedBox(height: 25), //password input
//password input SizedBox(
SizedBox( width: 500.0,
width: 500.0, child: MyPassField(
child: MyPassField( controller: passwordController,
controller: confirmPasswordController, hintText: 'Password',
hintText: 'Confirm Password', required: true,
required: true, ),
), ),
), //spacer
//spacer const SizedBox(height: 10),
const SizedBox(height: 10), //password input
// sign up button SizedBox(
SizedBox( width: 500.0,
width: 500.0, child: MyPassField(
height: 100.0, controller: confirmPasswordController,
child: MyButton( hintText: 'Confirm Password',
buttonText: "Sign Up", required: true,
buttonColor: MzanziInnovationHub.of(context)! ),
.theme ),
.secondaryColor(), //spacer
textColor: const SizedBox(height: 10),
MzanziInnovationHub.of(context)!.theme.primaryColor(), // sign up button
onTap: () async { SizedBox(
if (emailController.text.isEmpty || width: 500.0,
passwordController.text.isEmpty) { height: 100.0,
showDialog( child: MyButton(
context: context, buttonText: "Sign Up",
builder: (context) { buttonColor: MzanziInnovationHub.of(context)!
return const MyErrorMessage( .theme
errorType: "Input Error"); .secondaryColor(),
}, textColor: MzanziInnovationHub.of(context)!
); .theme
} else { .primaryColor(),
await signUserUp(); onTap: () async {
if (successfulSignUp) { if (emailController.text.isEmpty ||
Navigator.of(context).pushNamed('/homme'); 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
//register text SizedBox(
SizedBox( width: 500.0,
width: 450.0, //height: 100.0,
height: 100.0,
child: Padding(
padding: const EdgeInsets.all(30.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
@@ -349,9 +351,9 @@ class _RegisterState extends State<Register> {
) )
], ],
), ),
), )
) ],
], ),
), ),
), ),
), ),

View File

@@ -120,93 +120,95 @@ class _SignInState extends State<SignIn> {
child: Center( child: Center(
child: SingleChildScrollView( child: SingleChildScrollView(
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
child: Column( child: Padding(
mainAxisAlignment: MainAxisAlignment.center, padding: const EdgeInsets.all(25.0),
children: [ child: Column(
//logo mainAxisAlignment: MainAxisAlignment.center,
Icon( children: [
Icons.lock, //logo
size: 100, Icon(
color: Icons.lock,
MzanziInnovationHub.of(context)!.theme.secondaryColor(), size: 100,
),
//spacer
const SizedBox(height: 10),
//Heading
Text(
'Sign In',
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MzanziInnovationHub.of(context)! color: MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .secondaryColor(),
), ),
), //spacer
//spacer const SizedBox(height: 10),
const SizedBox(height: 25), //Heading
//email input Text(
SizedBox( 'Sign In',
width: 500.0, style: TextStyle(
child: MyTextField( fontSize: 25,
controller: emailController, fontWeight: FontWeight.bold,
hintText: 'Email', color: MzanziInnovationHub.of(context)!
editable: true, .theme
required: true, .secondaryColor(),
),
), ),
), //spacer
//spacer const SizedBox(height: 25),
const SizedBox(height: 25), //email input
//password input SizedBox(
SizedBox( width: 500.0,
width: 500.0, child: MyTextField(
child: MyPassField( controller: emailController,
controller: passwordController, hintText: 'Email',
hintText: 'Password', editable: true,
required: true, required: true,
),
), ),
), //spacer
//spacer const SizedBox(height: 10),
const SizedBox(height: 10), //password input
// sign in button SizedBox(
SizedBox( width: 500.0,
width: 500.0, child: MyPassField(
height: 100.0, controller: passwordController,
child: MyButton( hintText: 'Password',
buttonText: "Sign In", required: true,
buttonColor: MzanziInnovationHub.of(context)! ),
.theme ),
.secondaryColor(), //spacer
textColor: const SizedBox(height: 10),
MzanziInnovationHub.of(context)!.theme.primaryColor(), // sign in button
onTap: () async { SizedBox(
if (emailController.text.isEmpty || width: 500.0,
passwordController.text.isEmpty) { height: 100.0,
showDialog( child: MyButton(
context: context, buttonText: "Sign In",
builder: (context) { buttonColor: MzanziInnovationHub.of(context)!
return const MyErrorMessage( .theme
errorType: "Input Error"); .secondaryColor(),
}, textColor: MzanziInnovationHub.of(context)!
); .theme
} else { .primaryColor(),
await signUserIn(); onTap: () async {
//print(successfulSignIn); if (emailController.text.isEmpty ||
if (successfulSignIn) { passwordController.text.isEmpty) {
Navigator.of(context).pushNamed('/home'); showDialog(
context: context,
builder: (context) {
return const MyErrorMessage(
errorType: "Input Error");
},
);
} else {
await signUserIn();
//print(successfulSignIn);
if (successfulSignIn) {
Navigator.of(context).pushNamed('/home');
}
} }
} },
}, ),
), ),
), //spacer
//spacer //const SizedBox(height: 30),
//const SizedBox(height: 30), //register text
//register text SizedBox(
SizedBox( width: 500.0,
width: 450.0, //height: 100.0,
height: 100.0,
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
@@ -237,9 +239,9 @@ class _SignInState extends State<SignIn> {
), ),
], ],
), ),
), )
) ],
], ),
), ),
), ),
), ),