Add input error pop up on forms
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user