Add new mih text form field to Auth

This commit is contained in:
2025-06-04 11:19:30 +02:00
parent 16eec990d6
commit 4fb9992dfa
4 changed files with 488 additions and 441 deletions

View File

@@ -2,11 +2,13 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:mzansi_innovation_hub/mih_apis/mih_validation_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_form.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
import '../../main.dart'; import '../../main.dart';
import 'package:supertokens_flutter/http.dart' as http; import 'package:supertokens_flutter/http.dart' as http;
import '../../mih_components/mih_inputs_and_buttons/mih_text_input.dart';
import '../../mih_components/mih_layout/mih_action.dart'; import '../../mih_components/mih_layout/mih_action.dart';
import '../../mih_components/mih_layout/mih_body.dart'; import '../../mih_components/mih_layout/mih_body.dart';
import '../../mih_components/mih_layout/mih_header.dart'; import '../../mih_components/mih_layout/mih_header.dart';
@@ -25,6 +27,7 @@ class ForgotPassword extends StatefulWidget {
class _ForgotPasswordState extends State<ForgotPassword> { class _ForgotPasswordState extends State<ForgotPassword> {
final emailController = TextEditingController(); final emailController = TextEditingController();
final _formKey = GlobalKey<FormState>();
//bool _obscureText = true; //bool _obscureText = true;
bool successfulForgotPassword = false; bool successfulForgotPassword = false;
@@ -244,25 +247,35 @@ class _ForgotPasswordState extends State<ForgotPassword> {
.secondaryColor(), .secondaryColor(),
), ),
), ),
//spacer
const SizedBox(height: 25), const SizedBox(height: 25),
MihForm(
//email input formKey: _formKey,
SizedBox( formFields: [
width: 500.0, MihTextFormField(
child: MIHTextField( fillColor: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
inputColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
controller: emailController, controller: emailController,
hintText: 'Email', multiLineInput: false,
editable: true, requiredText: true,
required: true, hintText: "Email",
validator: (value) {
return MihValidationServices()
.validateEmail(value);
},
), ),
),
//spacer //spacer
const SizedBox(height: 25), const SizedBox(height: 20),
MihButton( Align(
alignment: Alignment.center,
child: MihButton(
onPressed: () { onPressed: () {
if (_formKey.currentState!.validate()) {
prePassResteWarning(); prePassResteWarning();
}
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
@@ -279,6 +292,9 @@ class _ForgotPasswordState extends State<ForgotPassword> {
), ),
), ),
), ),
),
],
),
], ],
), ),
), ),

View File

@@ -1,18 +1,16 @@
import 'dart:convert'; import 'dart:convert';
import 'package:mzansi_innovation_hub/mih_apis/mih_validation_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_form.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import '../../main.dart'; import '../../main.dart';
//import '../objects/sessionST.dart';
//import 'package:supertokens_flutter/supertokens.dart';
import 'package:supertokens_flutter/http.dart' as http; import 'package:supertokens_flutter/http.dart' as http;
import 'package:supertokens_flutter/supertokens.dart'; import 'package:supertokens_flutter/supertokens.dart';
import '../../mih_components/mih_inputs_and_buttons/mih_pass_input.dart';
import '../../mih_components/mih_inputs_and_buttons/mih_text_input.dart';
import '../../mih_components/mih_layout/mih_action.dart'; import '../../mih_components/mih_layout/mih_action.dart';
import '../../mih_components/mih_layout/mih_body.dart'; import '../../mih_components/mih_layout/mih_body.dart';
import '../../mih_components/mih_layout/mih_header.dart'; import '../../mih_components/mih_layout/mih_header.dart';
@@ -37,6 +35,7 @@ class _RegisterState extends State<Register> {
final officeID = TextEditingController(); final officeID = TextEditingController();
final baseAPI = AppEnviroment.baseApiUrl; final baseAPI = AppEnviroment.baseApiUrl;
final FocusNode _focusNode = FocusNode(); final FocusNode _focusNode = FocusNode();
final _formKey = GlobalKey<FormState>();
bool _obscureText = true; bool _obscureText = true;
bool successfulSignUp = false; bool successfulSignUp = false;
@@ -218,20 +217,9 @@ class _RegisterState extends State<Register> {
); );
} }
void validateInput() async { void submitFormInput() async {
if (emailController.text.isEmpty ||
passwordController.text.isEmpty ||
confirmPasswordController.text.isEmpty) {
showDialog(
context: context,
builder: (context) {
return const MIHErrorMessage(errorType: "Input Error");
},
);
} else {
await signUserUp(); await signUserUp();
} }
}
void toggle() { void toggle() {
setState(() { setState(() {
@@ -325,7 +313,9 @@ class _RegisterState extends State<Register> {
onKeyEvent: (event) async { onKeyEvent: (event) async {
if (event is KeyDownEvent && if (event is KeyDownEvent &&
event.logicalKey == LogicalKeyboardKey.enter) { event.logicalKey == LogicalKeyboardKey.enter) {
validateInput(); if (_formKey.currentState!.validate()) {
submitFormInput();
}
} }
}, },
child: SafeArea( child: SafeArea(
@@ -360,49 +350,80 @@ class _RegisterState extends State<Register> {
), ),
//spacer //spacer
const SizedBox(height: 25), const SizedBox(height: 25),
MihForm(
formKey: _formKey,
formFields: [
//email input //email input
SizedBox( MihTextFormField(
width: 500.0, fillColor: MzanziInnovationHub.of(context)!
child: MIHTextField( .theme
.secondaryColor(),
inputColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
controller: emailController, controller: emailController,
hintText: 'Email', multiLineInput: false,
editable: true, requiredText: true,
required: true, hintText: "Email",
), autofillHints: const [AutofillHints.email],
), validator: (value) {
//spacer return MihValidationServices().validateEmail(value);
const SizedBox(height: 10),
//password input
SizedBox(
width: 500.0,
child: MIHPassField(
controller: passwordController,
hintText: 'Password',
required: true,
signIn: false,
),
),
//spacer
const SizedBox(height: 10),
//password input
SizedBox(
width: 500.0,
child: MIHPassField(
controller: confirmPasswordController,
hintText: 'Confirm Password',
required: true,
signIn: false,
),
),
//spacer
const SizedBox(height: 25),
// sign up button
MihButton(
onPressed: () {
validateInput();
}, },
buttonColor: ),
MzanziInnovationHub.of(context)!.theme.successColor(), //spacer
const SizedBox(height: 10),
//password input
MihTextFormField(
fillColor: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
inputColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
controller: passwordController,
multiLineInput: false,
requiredText: true,
hintText: "Password",
passwordMode: true,
autofillHints: const [AutofillHints.password],
validator: (value) {
return MihValidationServices()
.validatePassword(value);
},
),
//spacer
const SizedBox(height: 10),
MihTextFormField(
fillColor: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
inputColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
controller: confirmPasswordController,
multiLineInput: false,
requiredText: true,
hintText: "Confirm Password",
passwordMode: true,
autofillHints: const [AutofillHints.password],
validator: (value) {
return MihValidationServices()
.validatePassword(value);
},
),
//spacer
const SizedBox(height: 20),
// sign up button
Center(
child: MihButton(
onPressed: () {
if (_formKey.currentState!.validate()) {
submitFormInput();
}
},
buttonColor: MzanziInnovationHub.of(context)!
.theme
.successColor(),
width: 300, width: 300,
child: Text( child: Text(
"Create New Account", "Create New Account",
@@ -415,18 +436,20 @@ class _RegisterState extends State<Register> {
), ),
), ),
), ),
),
const SizedBox(height: 10), const SizedBox(height: 10),
//register text //register text
SizedBox( SizedBox(
width: 500.0, width: 300.0,
//height: 100.0, //height: 100.0,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
const Text( const Text(
'Already a User?', 'Already a User?',
style: TextStyle(fontSize: 18, color: Colors.grey), style:
TextStyle(fontSize: 18, color: Colors.grey),
), ),
const SizedBox( const SizedBox(
width: 6, width: 6,
@@ -446,6 +469,9 @@ class _RegisterState extends State<Register> {
) )
], ],
), ),
//here
),
],
) )
], ],
), ),

View File

@@ -2,10 +2,12 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:mzansi_innovation_hub/mih_apis/mih_validation_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_form.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
import '../../main.dart'; import '../../main.dart';
import 'package:supertokens_flutter/http.dart' as http; import 'package:supertokens_flutter/http.dart' as http;
import '../../mih_components/mih_inputs_and_buttons/mih_pass_input.dart';
import '../../mih_components/mih_layout/mih_action.dart'; import '../../mih_components/mih_layout/mih_action.dart';
import '../../mih_components/mih_layout/mih_body.dart'; import '../../mih_components/mih_layout/mih_body.dart';
import '../../mih_components/mih_layout/mih_header.dart'; import '../../mih_components/mih_layout/mih_header.dart';
@@ -35,6 +37,7 @@ class _ResetPasswordState extends State<ResetPassword> {
bool acceptWarning = false; bool acceptWarning = false;
// focus node to capture keyboard events // focus node to capture keyboard events
final FocusNode _focusNode = FocusNode(); final FocusNode _focusNode = FocusNode();
final _formKey = GlobalKey<FormState>();
final baseAPI = AppEnviroment.baseApiUrl; final baseAPI = AppEnviroment.baseApiUrl;
@@ -131,16 +134,8 @@ class _ResetPasswordState extends State<ResetPassword> {
); );
} }
void validateInput() async { void submitFormInput() async {
if (passwordController.text.isEmpty || if (passwordController.text != confirmPasswordController.text) {
confirmPasswordController.text.isEmpty) {
showDialog(
context: context,
builder: (context) {
return const MIHErrorMessage(errorType: "Input Error");
},
);
} else if (passwordController.text != confirmPasswordController.text) {
passwordError(); passwordError();
} else { } else {
await submitPasswodReset(); await submitPasswodReset();
@@ -195,7 +190,9 @@ class _ResetPasswordState extends State<ResetPassword> {
onKeyEvent: (event) async { onKeyEvent: (event) async {
if (event is KeyDownEvent && if (event is KeyDownEvent &&
event.logicalKey == LogicalKeyboardKey.enter) { event.logicalKey == LogicalKeyboardKey.enter) {
validateInput(); if (_formKey.currentState!.validate()) {
submitFormInput();
}
} }
}, },
child: SafeArea( child: SafeArea(
@@ -229,48 +226,80 @@ class _ResetPasswordState extends State<ResetPassword> {
), ),
), ),
//spacer //spacer
// const SizedBox(height: 15),
// Text(
// 'token: ${widget.token}',
// style: TextStyle(
// fontSize: 15,
// fontWeight: FontWeight.bold,
// color: MzanziInnovationHub.of(context)!
// .theme
// .secondaryColor(),
// ),
// ),
//spacer
const SizedBox(height: 25), const SizedBox(height: 25),
//email input MihForm(
SizedBox( formKey: _formKey,
width: 500.0, formFields: [
child: MIHPassField( MihTextFormField(
fillColor: MzanziInnovationHub.of(context)!
.theme
.secondaryColor(),
inputColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
controller: passwordController, controller: passwordController,
hintText: 'New Password', multiLineInput: false,
required: true, requiredText: true,
signIn: false, hintText: "Password",
), passwordMode: true,
autofillHints: const [AutofillHints.password],
validator: (value) {
return MihValidationServices()
.validatePassword(value);
},
), ),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
//password input MihTextFormField(
SizedBox( fillColor: MzanziInnovationHub.of(context)!
width: 500.0, .theme
child: MIHPassField( .secondaryColor(),
inputColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
controller: confirmPasswordController, controller: confirmPasswordController,
hintText: 'Confirm New Password', multiLineInput: false,
required: true, requiredText: true,
signIn: false, hintText: "Confirm Password",
), passwordMode: true,
autofillHints: const [AutofillHints.password],
validator: (value) {
return MihValidationServices()
.validatePassword(value);
},
), ),
// //email input
// SizedBox(
// width: 500.0,
// child: MIHPassField(
// controller: passwordController,
// hintText: 'New Password',
// required: true,
// signIn: false,
// ),
// ),
// //spacer
// const SizedBox(height: 10),
// //password input
// SizedBox(
// width: 500.0,
// child: MIHPassField(
// controller: confirmPasswordController,
// hintText: 'Confirm New Password',
// required: true,
// signIn: false,
// ),
// ),
//spacer //spacer
const SizedBox(height: 25), const SizedBox(height: 25),
// sign in button // sign in button
MihButton( MihButton(
onPressed: () { onPressed: () {
validateInput(); if (_formKey.currentState!.validate()) {
submitFormInput();
}
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor: MzanziInnovationHub.of(context)!
.theme .theme
@@ -289,6 +318,8 @@ class _ResetPasswordState extends State<ResetPassword> {
), ),
], ],
), ),
],
),
), ),
), ),
), ),

View File

@@ -1,13 +1,14 @@
import 'dart:convert'; import 'dart:convert';
import 'package:mzansi_innovation_hub/mih_apis/mih_validation_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_form.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import '../../main.dart'; import '../../main.dart';
import 'package:supertokens_flutter/http.dart' as http; import 'package:supertokens_flutter/http.dart' as http;
import '../../mih_components/mih_inputs_and_buttons/mih_pass_input.dart';
import '../../mih_components/mih_inputs_and_buttons/mih_text_input.dart';
import '../../mih_components/mih_layout/mih_action.dart'; import '../../mih_components/mih_layout/mih_action.dart';
import '../../mih_components/mih_layout/mih_body.dart'; import '../../mih_components/mih_layout/mih_body.dart';
import '../../mih_components/mih_layout/mih_header.dart'; import '../../mih_components/mih_layout/mih_header.dart';
@@ -34,6 +35,7 @@ class _SignInState extends State<SignIn> {
// focus node to capture keyboard events // focus node to capture keyboard events
final FocusNode _focusNode = FocusNode(); final FocusNode _focusNode = FocusNode();
final _formKey = GlobalKey<FormState>();
final baseAPI = AppEnviroment.baseApiUrl; final baseAPI = AppEnviroment.baseApiUrl;
@@ -99,7 +101,9 @@ class _SignInState extends State<SignIn> {
emailController.text = "testpatient@mzansi-innovation-hub.co.za"; emailController.text = "testpatient@mzansi-innovation-hub.co.za";
passwordController.text = "Testprofile@1234"; passwordController.text = "Testprofile@1234";
}); });
validateInput(); if (_formKey.currentState!.validate()) {
submitSignInForm();
}
}, },
tileName: "Patient", tileName: "Patient",
tileIcon: Icon( tileIcon: Icon(
@@ -116,7 +120,9 @@ class _SignInState extends State<SignIn> {
emailController.text = "testdoctor@mzansi-innovation-hub.co.za"; emailController.text = "testdoctor@mzansi-innovation-hub.co.za";
passwordController.text = "Testprofile@1234"; passwordController.text = "Testprofile@1234";
}); });
validateInput(); if (_formKey.currentState!.validate()) {
submitSignInForm();
}
}, },
tileName: "Doctor", tileName: "Doctor",
tileIcon: Icon( tileIcon: Icon(
@@ -134,7 +140,9 @@ class _SignInState extends State<SignIn> {
emailController.text = "test-business@mzansi-innovation-hub.co.za"; emailController.text = "test-business@mzansi-innovation-hub.co.za";
passwordController.text = "Testprofile@1234"; passwordController.text = "Testprofile@1234";
}); });
validateInput(); if (_formKey.currentState!.validate()) {
submitSignInForm();
}
}, },
tileName: "Business", tileName: "Business",
tileIcon: Icon( tileIcon: Icon(
@@ -151,7 +159,9 @@ class _SignInState extends State<SignIn> {
emailController.text = "test@mzansi-innovation-hub.co.za"; emailController.text = "test@mzansi-innovation-hub.co.za";
passwordController.text = "Testprofile@1234"; passwordController.text = "Testprofile@1234";
}); });
validateInput(); if (_formKey.currentState!.validate()) {
submitSignInForm();
}
}, },
tileName: "Test", tileName: "Test",
tileIcon: Icon( tileIcon: Icon(
@@ -174,18 +184,9 @@ class _SignInState extends State<SignIn> {
); );
} }
void validateInput() async { void submitSignInForm() async {
if (emailController.text.isEmpty || passwordController.text.isEmpty) {
showDialog(
context: context,
builder: (context) {
return const MIHErrorMessage(errorType: "Input Error");
},
);
} else {
await signUserIn(); await signUserIn();
if (successfulSignIn) { if (successfulSignIn) {
// TextInput.finishAutofillContext();
Navigator.of(context).pushNamedAndRemoveUntil( Navigator.of(context).pushNamedAndRemoveUntil(
'/', '/',
(route) => false, (route) => false,
@@ -196,7 +197,6 @@ class _SignInState extends State<SignIn> {
); );
} }
} }
}
void showSandboxProfiles() { void showSandboxProfiles() {
showDialog( showDialog(
@@ -371,7 +371,9 @@ class _SignInState extends State<SignIn> {
onKeyEvent: (event) async { onKeyEvent: (event) async {
if (event is KeyDownEvent && if (event is KeyDownEvent &&
event.logicalKey == LogicalKeyboardKey.enter) { event.logicalKey == LogicalKeyboardKey.enter) {
validateInput(); if (_formKey.currentState!.validate()) {
submitSignInForm();
}
} }
}, },
child: SafeArea( child: SafeArea(
@@ -407,57 +409,46 @@ class _SignInState extends State<SignIn> {
), ),
//spacer //spacer
const SizedBox(height: 25), const SizedBox(height: 25),
MihForm(
// SizedBox( formKey: _formKey,
// width: 500.0, formFields: [
// //height: 100.0, MihTextFormField(
// child: Row( fillColor: MzanziInnovationHub.of(context)!
// mainAxisAlignment: MainAxisAlignment.start, .theme
// children: [ .secondaryColor(),
// GestureDetector( inputColor: MzanziInnovationHub.of(context)!
// onTap: () { .theme
// showSandboxProfiles(); .primaryColor(),
// },
// child: Text(
// 'Sandbox Profile',
// style: TextStyle(
// fontSize: 18,
// color: MzanziInnovationHub.of(context)!
// .theme
// .secondaryColor(),
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// ],
// ),
// ),
// const SizedBox(height: 10),
//email input
SizedBox(
width: 500.0,
child: MIHTextField(
controller: emailController, controller: emailController,
hintText: 'Email', multiLineInput: false,
editable: true, requiredText: true,
required: true, hintText: "Email",
autoFillHintGroup: const [AutofillHints.email], autofillHints: const [AutofillHints.email],
textInputAction: TextInputAction.next, validator: (value) {
return MihValidationServices()
.validateEmail(value);
},
), ),
),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 10),
//password input //password input
SizedBox( MihTextFormField(
width: 500.0, fillColor: MzanziInnovationHub.of(context)!
child: MIHPassField( .theme
.secondaryColor(),
inputColor: MzanziInnovationHub.of(context)!
.theme
.primaryColor(),
controller: passwordController, controller: passwordController,
hintText: 'Password', multiLineInput: false,
required: true, requiredText: true,
signIn: true, hintText: "Password",
autoFillHintGroup: const [AutofillHints.password], passwordMode: true,
), autofillHints: const [AutofillHints.password],
validator: (value) {
return MihValidationServices()
.validatePassword(value);
},
), ),
SizedBox( SizedBox(
width: 500.0, width: 500.0,
@@ -487,13 +478,23 @@ class _SignInState extends State<SignIn> {
), ),
//spacer //spacer
const SizedBox(height: 30), const SizedBox(height: 20),
// sign in button // sign in button
Center(
child: Wrap(
alignment: WrapAlignment.center,
runAlignment: WrapAlignment.center,
spacing: 10,
runSpacing: 10,
children: [
MihButton( MihButton(
onPressed: () { onPressed: () {
validateInput(); if (_formKey.currentState!.validate()) {
submitSignInForm();
}
}, },
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor(), .secondaryColor(),
width: 300, width: 300,
@@ -511,7 +512,8 @@ class _SignInState extends State<SignIn> {
const SizedBox(height: 10), const SizedBox(height: 10),
MihButton( MihButton(
onPressed: widget.onTap, onPressed: widget.onTap,
buttonColor: MzanziInnovationHub.of(context)! buttonColor:
MzanziInnovationHub.of(context)!
.theme .theme
.successColor(), .successColor(),
width: 300, width: 300,
@@ -526,44 +528,12 @@ class _SignInState extends State<SignIn> {
), ),
), ),
), ),
],
),
),
//spacer //spacer
const SizedBox(height: 10), const SizedBox(height: 20),
//register text
// SizedBox(
// width: 500.0,
// //height: 100.0,
// child: Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// Text(
// 'New User?',
// style: TextStyle(
// fontSize: 18,
// color: MzanziInnovationHub.of(context)!
// .theme
// .messageTextColor()),
// ),
// const SizedBox(
// width: 6,
// ),
// GestureDetector(
// onTap: widget.onTap,
// child: Text(
// 'Register Now',
// style: TextStyle(
// fontSize: 18,
// color: MzanziInnovationHub.of(context)!
// .theme
// .secondaryColor(),
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// ],
// ),
// ),
//spacer
const SizedBox(height: 15),
SizedBox( SizedBox(
width: 500.0, width: 500.0,
//height: 100.0, //height: 100.0,
@@ -586,7 +556,8 @@ class _SignInState extends State<SignIn> {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 15, fontSize: 15,
color: MzanziInnovationHub.of(context)! color:
MzanziInnovationHub.of(context)!
.theme .theme
.secondaryColor()), .secondaryColor()),
), ),
@@ -616,7 +587,8 @@ class _SignInState extends State<SignIn> {
//mainAxisSize: MainAxisSize.max, //mainAxisSize: MainAxisSize.max,
children: [ children: [
GridView.builder( GridView.builder(
physics: const NeverScrollableScrollPhysics(), physics:
const NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemCount: sandboxProfileList.length, itemCount: sandboxProfileList.length,
gridDelegate: gridDelegate:
@@ -645,6 +617,8 @@ class _SignInState extends State<SignIn> {
), ),
], ],
), ),
],
),
), ),
), ),
), ),