login method

Future<void> login (
  1. String email,
  2. String password
)

Implementation

Future<void> login(String email, String password) async {
  if (!AuthValidations.isLoginEmailAndPasswordFilled(email, password)) {
    AuthException.throwException(
        AuthExceptionErrors.INTERNAL_ERROR_BLANK_EMAIL_PASSWORD);
  }

  return await _authRepository
      .login(email, password)
      .catchError((error) async {
    AuthException.throwException(error.toString());
  });
}