Dynamic Pop Ups - error
This commit is contained in:
@@ -14,17 +14,46 @@ class MIHErrorMessage extends StatefulWidget {
|
|||||||
|
|
||||||
class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
||||||
var messageTypes = <String, Widget>{};
|
var messageTypes = <String, Widget>{};
|
||||||
// late double width = 50;
|
late double popUpWidth;
|
||||||
// late double height = 50;
|
late double? popUpheight;
|
||||||
|
late double popUpTitleSize;
|
||||||
|
late double popUpSubtitleSize;
|
||||||
|
late double popUpBodySize;
|
||||||
|
late double popUpIconSize;
|
||||||
|
late double popUpPaddingSize;
|
||||||
Size? size;
|
Size? size;
|
||||||
|
|
||||||
|
void checkScreenSize() {
|
||||||
|
if (MzanziInnovationHub.of(context)!.theme.screenType == "desktop") {
|
||||||
|
setState(() {
|
||||||
|
popUpWidth = (size!.width / 4) * 2;
|
||||||
|
popUpheight = null;
|
||||||
|
popUpTitleSize = 25.0;
|
||||||
|
popUpSubtitleSize = 20.0;
|
||||||
|
popUpBodySize = 15;
|
||||||
|
popUpPaddingSize = 25.0;
|
||||||
|
popUpIconSize = 100;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
popUpWidth = size!.width - (size!.width * 0.1);
|
||||||
|
popUpheight = null;
|
||||||
|
popUpTitleSize = 20.0;
|
||||||
|
popUpSubtitleSize = 18.0;
|
||||||
|
popUpBodySize = 15;
|
||||||
|
popUpPaddingSize = 15.0;
|
||||||
|
popUpIconSize = 100;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void setInputError() {
|
void setInputError() {
|
||||||
messageTypes["Input Error"] = Stack(
|
messageTypes["Input Error"] = Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
width: 500,
|
width: popUpWidth,
|
||||||
height: 450,
|
height: popUpheight,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -38,43 +67,37 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.warning_amber_rounded,
|
Icons.warning_amber_rounded,
|
||||||
size: 100,
|
size: popUpIconSize,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 15),
|
//const SizedBox(height: 5),
|
||||||
Text(
|
Text(
|
||||||
"Oops! Looks like some fields are missing.",
|
"Oops! Looks like some fields are missing.",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: 25.0,
|
fontSize: popUpTitleSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 15),
|
||||||
Padding(
|
Text(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"We noticed that some required fields are still empty. To ensure your request is processed smoothly, please fill out all the highlighted fields before submitting the form again.",
|
"We noticed that some required fields are still empty. To ensure your request is processed smoothly, please fill out all the highlighted fields before submitting the form again.",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
.secondaryColor(),
|
fontSize: popUpBodySize,
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 25),
|
||||||
const SizedBox(height: 10),
|
RichText(
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: RichText(
|
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
fontSize: 15.0,
|
fontSize: popUpBodySize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
children: <TextSpan>[
|
children: <TextSpan>[
|
||||||
@@ -98,7 +121,7 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -127,9 +150,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
messageTypes["Password Requirements"] = Stack(
|
messageTypes["Password Requirements"] = Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
width: 500,
|
width: popUpWidth,
|
||||||
height: 450,
|
height: popUpheight,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -143,37 +166,31 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.warning_amber_rounded,
|
Icons.warning_amber_rounded,
|
||||||
size: 100,
|
size: popUpIconSize,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
),
|
),
|
||||||
SizedBox(height: 15),
|
//const SizedBox(height: 15),
|
||||||
Text(
|
Text(
|
||||||
"Password Doesn't Meet Requirements",
|
"Password Doesn't Meet Requirements",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: 25.0,
|
fontSize: popUpTitleSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 15),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"Oops! Your password doesn't quite meet our standards. To keep your account secure, please make sure your password meets the following requirements",
|
"Oops! Your password doesn't quite meet our standards. To keep your account secure, please make sure your password meets the following requirements",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
.secondaryColor(),
|
fontSize: popUpBodySize,
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 25),
|
||||||
const SizedBox(height: 10),
|
RichText(
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: RichText(
|
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color: MzanziInnovationHub.of(context)!
|
||||||
@@ -187,6 +204,7 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
text: "Requirements:\n",
|
text: "Requirements:\n",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontStyle: FontStyle.italic,
|
fontStyle: FontStyle.italic,
|
||||||
|
fontSize: popUpBodySize,
|
||||||
color: MzanziInnovationHub.of(context)!
|
color: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.errorColor())),
|
.errorColor())),
|
||||||
@@ -194,12 +212,10 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
text: "1) Contailes at least 8 characters\n",
|
text: "1) Contailes at least 8 characters\n",
|
||||||
),
|
),
|
||||||
const TextSpan(
|
const TextSpan(
|
||||||
text:
|
text: "2) Contains at least 1 uppercase letter (A-Z)\n",
|
||||||
"2) Contains at least 1 uppercase letter (A-Z)\n",
|
|
||||||
),
|
),
|
||||||
const TextSpan(
|
const TextSpan(
|
||||||
text:
|
text: "3) Contains at least 1 lowercase letter (a-z)\n",
|
||||||
"3) Contains at least 1 lowercase letter (a-z)\n",
|
|
||||||
),
|
),
|
||||||
const TextSpan(
|
const TextSpan(
|
||||||
text: "4) Contains at least 1 number (0-9)\n",
|
text: "4) Contains at least 1 number (0-9)\n",
|
||||||
@@ -211,7 +227,7 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -240,9 +256,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
messageTypes["Invalid Username"] = Stack(
|
messageTypes["Invalid Username"] = Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
width: 500,
|
width: popUpWidth,
|
||||||
height: 450,
|
height: popUpheight,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -256,33 +272,30 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.warning_amber_rounded,
|
Icons.warning_amber_rounded,
|
||||||
size: 100,
|
size: popUpIconSize,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 15),
|
//const SizedBox(height: 15),
|
||||||
Text(
|
Text(
|
||||||
"Let's Fix That Username",
|
"Let's Fix That Username",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: 25.0,
|
fontSize: popUpTitleSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 15),
|
||||||
|
Text(
|
||||||
|
"Your username needs a little adjustment. To make sure everyone has a unique username, please start your username with a letter or number and use only letters, numbers or underscores. Let's try that again!",
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
fontSize: popUpBodySize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 25),
|
const SizedBox(height: 25),
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"Your username needs a little adjustment. To make sure everyone has a unique username, please start your username with a letter or number and use only letters, numbers or underscores. Let's try that again!",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -311,9 +324,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
messageTypes["Invalid Email"] = Stack(
|
messageTypes["Invalid Email"] = Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
width: 500,
|
width: popUpWidth,
|
||||||
height: 450,
|
height: popUpheight,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -327,33 +340,30 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.warning_amber_rounded,
|
Icons.warning_amber_rounded,
|
||||||
size: 100,
|
size: popUpIconSize,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 15),
|
//const SizedBox(height: 15),
|
||||||
Text(
|
Text(
|
||||||
"Oops! Invalid Email",
|
"Oops! Invalid Email",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: 25.0,
|
fontSize: popUpTitleSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 15),
|
||||||
|
Text(
|
||||||
|
"Looks like there's a little hiccup with that email address. Please double-check that you've entered it correctly, including the \"@\" symbol and a domain (like example@email.com).",
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
fontSize: popUpBodySize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 25),
|
const SizedBox(height: 25),
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"Looks like there's a little hiccup with that email address. Please double-check that you've entered it correctly, including the \"@\" symbol and a domain (like example@email.com).",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -382,9 +392,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
messageTypes["User Exists"] = Stack(
|
messageTypes["User Exists"] = Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
width: 500,
|
width: popUpWidth,
|
||||||
height: 450,
|
height: popUpheight,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -398,62 +408,49 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.warning_amber_rounded,
|
Icons.warning_amber_rounded,
|
||||||
size: 100,
|
size: popUpIconSize,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
),
|
),
|
||||||
SizedBox(height: 15),
|
//SizedBox(height: 15),
|
||||||
Text(
|
Text(
|
||||||
"Email Already Exists",
|
"Email Already Exists",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: 25.0,
|
fontSize: popUpTitleSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"An account is already registered with this email address. Please try logging in or use a different email.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
const SizedBox(height: 15),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
"An account is already registered with this email address. Please try logging in or use a different email.",
|
||||||
child: Text(
|
|
||||||
"Here are some things to keep in mind:",
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
.secondaryColor(),
|
fontSize: popUpBodySize,
|
||||||
fontSize: 20.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
"Here are some things to keep in mind:",
|
||||||
child: Text(
|
style: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
|
fontSize: popUpSubtitleSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
fontSize: 15.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -482,9 +479,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
messageTypes["Password Match"] = Stack(
|
messageTypes["Password Match"] = Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
width: 500,
|
width: popUpWidth,
|
||||||
height: 450,
|
height: popUpheight,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -498,62 +495,50 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.warning_amber_rounded,
|
Icons.warning_amber_rounded,
|
||||||
size: 100,
|
size: popUpIconSize,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
),
|
),
|
||||||
SizedBox(height: 15),
|
//SizedBox(height: 15),
|
||||||
Text(
|
Text(
|
||||||
"Passwords Don't Match",
|
"Passwords Don't Match",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: 25.0,
|
fontSize: popUpTitleSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"The password and confirm password fields do not match. Please make sure they are identical.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
const SizedBox(height: 15),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
"The password and confirm password fields do not match. Please make sure they are identical.",
|
||||||
child: Text(
|
|
||||||
"Here are some things to keep in mind:",
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
.secondaryColor(),
|
fontSize: popUpBodySize,
|
||||||
fontSize: 20.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
"Here are some things to keep in mind:",
|
||||||
child: Text(
|
|
||||||
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
.theme
|
fontSize: popUpSubtitleSize,
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
fontSize: popUpBodySize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -582,9 +567,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
messageTypes["Invalid Credentials"] = Stack(
|
messageTypes["Invalid Credentials"] = Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
width: 500,
|
width: popUpWidth,
|
||||||
height: 450,
|
height: popUpheight,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -598,62 +583,50 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.warning_amber_rounded,
|
Icons.warning_amber_rounded,
|
||||||
size: 100,
|
size: popUpIconSize,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
),
|
),
|
||||||
SizedBox(height: 15),
|
//SizedBox(height: 15),
|
||||||
Text(
|
Text(
|
||||||
"Uh oh! Login attempt unsuccessful.",
|
"Uh oh! Login attempt unsuccessful.",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: 25.0,
|
fontSize: popUpTitleSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"The email address or password you entered doesn't seem to match our records. Please double-check your information and try again.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
const SizedBox(height: 15),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
"The email address or password you entered doesn't seem to match our records. Please double-check your information and try again.",
|
||||||
child: Text(
|
|
||||||
"Here are some things to keep in mind:",
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
.secondaryColor(),
|
fontSize: popUpBodySize,
|
||||||
fontSize: 20.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
"Here are some things to keep in mind:",
|
||||||
child: Text(
|
|
||||||
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
.theme
|
fontSize: popUpSubtitleSize,
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
fontSize: popUpBodySize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -682,9 +655,9 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
messageTypes["Internet Connection"] = Stack(
|
messageTypes["Internet Connection"] = Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(popUpPaddingSize),
|
||||||
width: 500,
|
width: popUpWidth,
|
||||||
height: 450,
|
height: popUpheight,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
@@ -698,62 +671,50 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.warning_amber_rounded,
|
Icons.warning_amber_rounded,
|
||||||
size: 100,
|
size: popUpIconSize,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 15),
|
//const SizedBox(height: 15),
|
||||||
Text(
|
Text(
|
||||||
"Internet Connection Lost!",
|
"Internet Connection Lost!",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
fontSize: 25.0,
|
fontSize: popUpTitleSize,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"We seem to be having some trouble connecting you to the internet. This could be due to a temporary outage or an issue with your device's connection.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
const SizedBox(height: 15),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
"We seem to be having some trouble connecting you to the internet. This could be due to a temporary outage or an issue with your device's connection.",
|
||||||
child: Text(
|
|
||||||
"Here are a few things you can try:",
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
.secondaryColor(),
|
fontSize: popUpBodySize,
|
||||||
fontSize: 20.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 15),
|
||||||
|
Text(
|
||||||
|
"Here are a few things you can try:",
|
||||||
|
style: TextStyle(
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
|
fontSize: popUpSubtitleSize,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Padding(
|
Text(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 25.0),
|
|
||||||
child: Text(
|
|
||||||
"1) Check your Wi-Fi signal strength or try connecting to a different network.\n2) Restart your device (computer, phone, etc.) and your router/modem.\n3) If you're using cellular data, ensure you have a strong signal and haven't reached your data limit.",
|
"1) Check your Wi-Fi signal strength or try connecting to a different network.\n2) Restart your device (computer, phone, etc.) and your router/modem.\n3) If you're using cellular data, ensure you have a strong signal and haven't reached your data limit.",
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MzanziInnovationHub.of(context)!
|
color:
|
||||||
.theme
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
.secondaryColor(),
|
fontSize: popUpBodySize,
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -791,6 +752,7 @@ class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
size = MediaQuery.of(context).size;
|
size = MediaQuery.of(context).size;
|
||||||
|
checkScreenSize();
|
||||||
setInputError();
|
setInputError();
|
||||||
setinvalidCredError();
|
setinvalidCredError();
|
||||||
setInternetError();
|
setInternetError();
|
||||||
|
|||||||
Reference in New Issue
Block a user