fromCEP method
- String cep
Busca um endereço a partir do CEP.
O CEP é utilizado para buscar o endereço correspondente.
Parâmetros: - cep: O CEP do endereço.
Retorna: - O endereço correspondente ao CEP.
Implementation
Future<Endereco> fromCEP(String cep) async {
try {
return (await Brasil.pesquisarCEP(cep))!;
} on Exception catch (e) {
throw Exception("Erro ao buscar o CEP: $e");
}
}