optionCreateUser method

Future<Response> optionCreateUser()

Create a user

Implementation

Future<Response> optionCreateUser() async {
  clear();
  print('Create a user:');
  try {
    askName();
    askEmail();
    askPassword();

    var response = await _userUC.createUser(_name, _email, _password);

    if (response.statusCode == 400) {
      _response = 'response: ${response.statusCode}';
    } else {
      _response = 'response: ${response.body}';
    }
    return response;
  } catch (e) {
    _response = e.toString();
    throw ('createUser');
  }
}