email y contraseña registro

This commit is contained in:
Juan Felipe Duarte
2023-03-29 16:19:19 -05:00
parent 4727967a57
commit b80c99469c
7 changed files with 250 additions and 113 deletions
@@ -0,0 +1,19 @@
class SignUpWithEmailAndPasswordFailure {
final String message;
const SignUpWithEmailAndPasswordFailure(
[this.message = "An Unknown error ocurred."]);
factory SignUpWithEmailAndPasswordFailure.code(String code) {
switch (code) {
case 'weak-password':
return const SignUpWithEmailAndPasswordFailure(
'Please enter a stronger password.');
case 'email-alredy-in-use':
return const SignUpWithEmailAndPasswordFailure(
'An account alredy exists for that email.');
default:
return const SignUpWithEmailAndPasswordFailure();
}
}
}