country
7.0.0, released 5 months ago by an unverified publisher
Provides generated Dart classes with comprehensive country data and utilities.
WASM-ready
What it does
The package supplies a Country enum with fields like ISO codes, phone prefixes, currencies, and flag emojis. It also offers helper methods such as getting short names by locale and printing all countries.
AI-written summary of version 7.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need an offline, static list of country information.
- You want flag emojis and locale‑specific short names without network calls.
Skip it when
- You require up‑to‑date data that changes frequently.
- You need subdivision details (now in a separate package).
Strengths
- Comprehensive, ready‑to‑use country data
- Zero runtime dependencies
- Simple add‑dependency setup
Weaknesses
- Large static data increases app size
- No runtime updates; data is fixed at compile time
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
void main(){
for (final country in Countries.values) {
print('${country.isoShortName} ${country.flagEmoji}');
}
}Alternatives
Packages that do the same job and could replace country.
- supadart
CLI tool that generates type-safe Dart and Flutter classes from your Supabase database schema.
63Compare - functional_data
Annotations and helper lenses for generating boilerplate for immutable data types.
50Compare