search_cep
4.0.2, released 3 years ago by rodrigobastos.dev
Client for Brazilian CEP lookup via via_cep and Postmon APIs
WASM-ready
What it does
search_cep provides a simple API to query Brazilian postal codes (CEPs) and retrieve address information. It supports both via_cep and Postmon services, returning structured data and detailed error objects.
AI-written summary of version 4.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to validate or display address information based on a CEP in a Flutter app
- You want a null‑safe, fully tested wrapper around the Brazilian CEP APIs
- You need error handling for invalid or non‑existent CEPs
Skip it when
- You need a global state management solution or a different country’s postal code API
- You require advanced caching or offline support beyond what the API offers
Strengths
- Fully tested and null‑safe
- Clear error handling with custom error objects
- Supports two popular Brazilian CEP services
- No code generation required
Weaknesses
- Limited to Brazilian CEPs only
- No built‑in caching or offline mode
- Relies on external APIs that may have rate limits
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Add dependency to pubspec and import the package; no special permissions or build_runner needed
final viaCep = ViaCepSearchCep();
final info = await viaCep.searchInfoByCep(cep: '01001000');
print(info);Works with
Packages commonly used together with search_cep: ones it builds on, ones built on it, and its own family.