You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
submit() {
final validEmail = _emailController.value;
final validPassword = _passwordController.value;
print('Email is $validEmail, and password is $validPassword');
}
The text was updated successfully, but these errors were encountered:
Try this, or add more validations for example min lenght or something else
submit() {
if (email.length == 0) {
_emailController.sink.addError('This field cannot be empty');
}
if (pass.length == 0) {
_passController.sink.addError('This field cannot be empty');
}
}
How to show validation on submit?
The text was updated successfully, but these errors were encountered: