cep_fetcher 0.0.6
cep_fetcher: ^0.0.6 copied to clipboard
Pacote Dart simples para obter dados de endereço no Brasil a partir de um CEP usando múltiplas APIs.
example/example.dart
// Example usage of the `cep_fetcher` package.
// This example shows how to fetch address data from a Brazilian CEP using the
// CepFetcher class.
import 'package:cep_fetcher/cep_fetcher.dart';
import 'package:flutter/foundation.dart';
void main() async {
final fetcher = CepFetcher();
final result = await fetcher.fetchCepData('01001000');
if (result == null) {
debugPrint('CEP não encontrado');
} else {
debugPrint(
'Logradouro: ${result.address}, ${result.city} - ${result.state}',
);
}
}