signInWithEmailAndPassword method
Future<User?>
signInWithEmailAndPassword({
- required String email,
- required String password,
- Function? onSuccessOption,
- Function? userNotFound,
- Function? wrongPassword,
- Function? catchErrorOption,
override
Implementation
@override
Future<User?> signInWithEmailAndPassword({
required String email,
required String password,
Function? onSuccessOption,
Function? userNotFound,
Function? wrongPassword,
Function? catchErrorOption,
}) async {
try {
UserCredential userCredential = await auth.signInWithEmailAndPassword(
email: email, password: password);
onSuccessOption;
return userCredential.user;
} on FirebaseAuthException catch (e) {
firebaseAuthOnCacthError(
e,
userNotFound: userNotFound,
wrongPassword: wrongPassword,
);
} catch (e) {
catchOnError(' Sign In Email was Error: $e',
catchErrorOption: catchErrorOption);
}
return null;
}