Add input error pop up on forms
This commit is contained in:
parent
01150f9458
commit
e09f4e7d53
21 changed files with 91 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ import 'dart:convert';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_apis/mih_alert_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_form.dart';
|
||||
|
|
@ -280,6 +281,9 @@ class _ForgotPasswordState extends State<ForgotPassword> {
|
|||
onPressed: () {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
prePassResteWarning();
|
||||
} else {
|
||||
MihAlertServices()
|
||||
.formNotFilledCompletely(context);
|
||||
}
|
||||
},
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:mzansi_innovation_hub/mih_apis/mih_alert_services.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_apis/mih_install_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';
|
||||
|
|
@ -310,6 +311,8 @@ class _RegisterState extends State<Register> {
|
|||
event.logicalKey == LogicalKeyboardKey.enter) {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitFormInput();
|
||||
} else {
|
||||
MihAlertServices().formNotFilledCompletely(context);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -423,6 +426,9 @@ class _RegisterState extends State<Register> {
|
|||
onPressed: () {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitFormInput();
|
||||
} else {
|
||||
MihAlertServices()
|
||||
.formNotFilledCompletely(context);
|
||||
}
|
||||
},
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'dart:convert';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_apis/mih_alert_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_form.dart';
|
||||
|
|
@ -192,6 +193,8 @@ class _ResetPasswordState extends State<ResetPassword> {
|
|||
event.logicalKey == LogicalKeyboardKey.enter) {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitFormInput();
|
||||
} else {
|
||||
MihAlertServices().formNotFilledCompletely(context);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -303,6 +306,9 @@ class _ResetPasswordState extends State<ResetPassword> {
|
|||
onPressed: () {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitFormInput();
|
||||
} else {
|
||||
MihAlertServices()
|
||||
.formNotFilledCompletely(context);
|
||||
}
|
||||
},
|
||||
buttonColor: MzanziInnovationHub.of(context)!
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'dart:convert';
|
||||
import 'package:mzansi_innovation_hub/mih_apis/mih_alert_services.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_apis/mih_install_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';
|
||||
|
|
@ -104,6 +105,8 @@ class _SignInState extends State<SignIn> {
|
|||
});
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitSignInForm();
|
||||
} else {
|
||||
MihAlertServices().formNotFilledCompletely(context);
|
||||
}
|
||||
},
|
||||
tileName: "Patient",
|
||||
|
|
@ -123,6 +126,8 @@ class _SignInState extends State<SignIn> {
|
|||
});
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitSignInForm();
|
||||
} else {
|
||||
MihAlertServices().formNotFilledCompletely(context);
|
||||
}
|
||||
},
|
||||
tileName: "Doctor",
|
||||
|
|
@ -143,6 +148,8 @@ class _SignInState extends State<SignIn> {
|
|||
});
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitSignInForm();
|
||||
} else {
|
||||
MihAlertServices().formNotFilledCompletely(context);
|
||||
}
|
||||
},
|
||||
tileName: "Business",
|
||||
|
|
@ -162,6 +169,8 @@ class _SignInState extends State<SignIn> {
|
|||
});
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitSignInForm();
|
||||
} else {
|
||||
MihAlertServices().formNotFilledCompletely(context);
|
||||
}
|
||||
},
|
||||
tileName: "Test",
|
||||
|
|
@ -371,6 +380,8 @@ class _SignInState extends State<SignIn> {
|
|||
event.logicalKey == LogicalKeyboardKey.enter) {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitSignInForm();
|
||||
} else {
|
||||
MihAlertServices().formNotFilledCompletely(context);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -493,6 +504,9 @@ class _SignInState extends State<SignIn> {
|
|||
onPressed: () {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
submitSignInForm();
|
||||
} else {
|
||||
MihAlertServices()
|
||||
.formNotFilledCompletely(context);
|
||||
}
|
||||
},
|
||||
buttonColor:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue