Overview
sealed_countries is a Flutter/Dart package that provides comprehensive country data using sealed classes, ensuring type safety and immutability. It includes information such as country names, codes, and regions, making it ideal for applications requiring reliable country selection or code lookup. The package is designed with clean, structured data models and supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux. Its sealed class approach prevents unintended extensions and enhances code maintainability.
Use cases
- Country picker UI components
- Internationalization (i18n) setup
- Phone number or address form validation
- Currency and language region mapping
- API integration with country data
Key features
- Sealed class-based country data model
- Type-safe country enumeration
- Supports all major platforms
- Immutable and predictable data structures
- Comprehensive country metadata
Suitable for
- Developers building multilingual apps
- Form validation requiring country codes
- Apps needing country selection interfaces
- Teams prioritizing type safety in data modeling
- Projects targeting cross-platform deployment
Considerations
- Requires understanding of sealed classes in Dart
- Limited to static country data (no real-time updates)
- May increase build size slightly due to generated code