checkForViaCepError function

Map<String, dynamic> checkForViaCepError(
  1. Map<String, dynamic> responseObject
)

Implementation

Map<String, dynamic> checkForViaCepError(Map<String, dynamic> responseObject) {
  if (responseObject['erro'] == true) {
    throw SimpleError('CEP não encontrado na base do ViaCEP.');
  }

  return responseObject;
}