signIn method
Implementation
Future<XauthResponse?> signIn({required String email, required String password}) async {
try {
var response = await _auth.signInWithEmailAndPassword(
email: email, password: password);
XauthResponse resp = XauthResponse(
message: 'User Logged In successfully',
success: true,
xDataModel: await _xModel.get('xuid', response.user!.uid));
return resp;
} on FirebaseAuthException catch (e) {
XauthResponse resp = XauthResponse(
message: e.message ?? 'An error occured',
success: false,
xDataModel: null);
return resp;
}
}