checkForError method
Implementation
bool checkForError() {
emailErrorText.value = null;
passwordErrorText.value = null;
emailErrorText.value = validator.validateEmail(emailController.text);
passwordErrorText.value =
validator.validatePassword(passwordController.text);
return emailErrorText.value == null && passwordErrorText.value == null;
}