optionRecoverPassword method

Future<Response> optionRecoverPassword()

Send a email to your email address containing the new password

Implementation

Future<Response> optionRecoverPassword() async {
  clear();
  print('Recovery password:');
  try {
    askEmail();

    var response = await _userUC.recoverPassword(_email);

    if (response.statusCode == 400) {
      _response = 'response: ${response.statusCode}';
    } else {
      // returns 204 (no content) if ok
      _response = 'response: ${response.statusCode}';
    }
    return response;
  } catch (e) {
    _response = e.toString();
    throw ('recoverPassword');
  }
}