createAuthenticate method
Creates and authenticates a user in the service with the arguments
name
, email
and password
Implementation
@override
Future<Response> createAuthenticate(
String name, String email, String password) {
if (name.isEmpty ||
email.isEmpty ||
password.isEmpty ||
!EmailValidator.validate(email)) {
throw Exception(
'The arguments must be not empty and the e-mail must be valid');
} else {
if (password.length < 8) {
throw Exception('The password must have at least eight characters');
} else {
return _service.createAuthenticate(name, email, password);
}
}
}