checkForError method
Implementation
bool checkForError() {
emailErrorText.value = null;
passwordErrorText.value = null;
firstNameErrorText.value = null;
emailErrorText.value = validator.validateEmail(emailController.text);
passwordErrorText.value =
validator.validatePassword(passwordController.text);
firstNameErrorText.value =
validator.validateFullname(firstnameController.text);
phoneErrorText.value = validator.validatePhoneNumber(phoneController.text);
return emailErrorText.value == null &&
passwordErrorText.value == null &&
firstNameErrorText.value == null &&
phoneErrorText.value == null;
}