signInWithEmailNPassword method
Implementation
@override
Future<Response<UserCredential>> signInWithEmailNPassword({
required String email,
required String password,
}) async {
final response = Response<UserCredential>();
try {
final result = await firebaseAuth.signInWithEmailAndPassword(
email: email,
password: password,
);
return response.withData(result, message: "Sign in successful!");
} on FirebaseAuthException catch (_) {
return response.withException(_.message, status: Status.failure);
}
}