NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #2196 most downloaded on pub.dev
Provides data for world countries in the form of sealed classes.
Last release 9 days ago
28 Sep 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 35 of 35 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
35 releases · first in 2023
One column per quarter.
chore(deps): update l10n_countries in sealed_countries v3.4.1
chore(deps): update l10n_countries in sealed_countries v3.4.1
FIX
Fixed bunch of country translations and data errors in various locales:
sk) locale against the official list of country names published by the Slovak geodesy and cartography authority, fixing 75 entries:
AZE, DJI, FJI, KNA, GBR) and typos (e.g. in GRC, NLD, CXR, UMI).BOL, BRN, COM, LBY, IRL, BIH) and aligned short names (e.g. GBR, USA, KOR, PRK) and Slovak exonyms (e.g. BES, CUW, MTQ, SLB, VGB) with the official list.sr): GIN was translated as Guyana (both short and official name).pl): SSD was translated as Sudan.sq): NGA repeated the name of Niger.hu): ASM repeated the name of Samoa.fi): VGB and VIR both lacked their British and United States qualifiers.su): TWN repeated the name of China.MAF) and Dutch (SXM) parts of Saint Martin, which shared a short or an official name in the Czech (cs), Persian (fa), Croatian (hr), Portuguese (pt), Slovak (sk) and Serbian (sr) locales.hr): added the missing space in the HKG and MAC official names, and the NLD official name now matches its short name.pt): capitalized the MAF official name.ne): removed the unbalanced opening parenthesis from MAC.nl): added the missing space in the HMD short name.ja), Korean (ko), Polish (pl) and Urdu (ur) names.chore(deps): update sealed_countries dependencies
chore(deps): update sealed_countries dependencies
FIX
Renamed the NRU country's name fields to Naoero, following the United Nations' update of the country's name: name.common is now "Naoero" and name.official is "Republic of Naoero". The CountryNru class itself was not renamed, so existing const CountryNru() / WorldCountry.nru() call sites compile unchanged. "Nauru" and "Republic of Nauru" remain in altSpellings, and all codes (NRU, NR, 520) are unchanged, so lookups are unaffected. The Nauruan native name is now "Ripublik Naoero" rather than a copy of the English one.
Note that anything displaying or snapshotting name.common for NR/NRU will show the new value.
IMPROVEMENTS
Inherited from l10n_countries 2.1.0:
availableLocales is now built on first read instead of in the constructor, making a localize() call (mapper construction included) around 15% faster. Mappers are single-use, so every call previously paid for materializing the full locale set even when it was never read.DOCUMENTATION
skills/sealed-countries-core), compliant with the Agent Skills specification, installable via dart run skills@ get.chore(deps): update sealed_countries dependencies
chore(deps): update sealed_countries dependencies
REFACTOR
@pragma("vm:deeply-immutable") optimization to Capital, CapitalInfo, Gini, LatLng, Maps, and PostalCode classes.Region, LanguageFamily and WritingSystem via @Deprecated.subclass(...) to prepare for making them final in the next major version.TEST
dartdoc_test validation for code samples in documentation comments.DOCUMENTATION
chore: update flags to v3.2.0 and add changelog for new features
chore: update flags to v3.2.0 and add changelog for new features
- Added new conversion methods for enum-to-object and object-to-enum mappings.
- Added new tests for the enum mapping methods, ensuring correct functionality and coverage.
NEW FEATURES
fromEnums and toEnums extension methods are added to SealedWorldNullableIterableIsoExtension to facilitate mapping between ISO objects and enums.TEST
Added isRtl parameter to IddExtension.phoneCode() method. When true, the leading symbol (e.g., +) is moved to the end of the string for correct displa
NEW FEATURES
isRtl parameter to IddExtension.phoneCode() method. When true, the leading symbol (e.g., +) is moved to the end of the string for correct display in right-to-left locales.copyWith methods now support resetting nullable fields to null via domain-invalid sentinel values:
String? fields: pass an empty string to reset (e.g. cioc: "", fifa: ""; also deJure, third on Capital).List? fields: pass an empty list to reset (e.g. bordersCodes: [], currencies: [], regionalBlocs: []).CHORE
sealed_currencies to v3.1.0 — added RTL support for currency formatting.Improved CHANGELOG for clarity.
DOCUMENTATION
List get translations was removed (was previously deprecated), refer to .l10n.translatedNames({this}) instead.
🎉 Third anniversary and new major release!
NEW FEATURES
namesCommonNative method on ISO (IsoTranslated) classes, returning the native name for the given locale as a single string.BREAKING CHANGES
namesNative are now provided in sentence case.JsonObjectMap - no longer nullable.List<TranslatedName> get translations was removed (was previously deprecated), refer to .l10n.translatedNames({this}) instead.WorldCountry, FiatCurrency, NaturalLanguage, etc.) instances - sealed classes with private constructors, you can create your own instances via CountryCustom for example:const custom = CountryCustom(code: "XTL", codeShort: "XT"); // Custom country.
Changes from underlying L10N packages:
Previously, localized strings were provided in mixed lowercase (e.g., "islas Malvinas", in Spanish for FLK code) and sentence case. They are now unified and provided in sentence case only (e.g., "Islas Malvinas", in Spanish for FLK code) to preserve capitalization context for proper nouns and ensure immediate compatibility with independent UI labels.
Justification: Capitalization is context-sensitive and cannot be reliably reconstructed from lowercase source strings. By providing values in sentence case, we ensure high-fidelity data for headers and labels. This was also part of discussion in the past.
Migration:
formatter callback, if not needed).formatter callback to strictly adapt the casing, rather than relying on direct string manipulation.final localized = mapper.localize(
isoCodes,
mainLocale: locale,
formatter: (_, l10n) => l10n.toLowerCase(), // <-- e.g., inline usage
);
CHORE
This version introduces named (Dart 3.10 dot-shorthand compatible) constructors for ISO classes, refactoring the ISO data files to use a factory const
NEW FEATURES
CountrySvk(), you can now use WorldCountry.svk(). This change enhances code readability and aligns with modern Dart practices.const country = CountrySvk(); // Old way (still supported).
const country = WorldCountry.svk(); // New way, or just .svk() in Dart 3.10.
print([WorldCountry.svk(), WorldCountry.cze()]); // Collections, 3.9 way.
// You can also use the new dot-shorthand syntax introduced in Dart 3.10:
print(<WorldCountry>[.svk(), .cze()]); // Collections, 3.10 way.
CHORE
currencies array updated to reflect current usage of both BGN and EUR in Bulgaria.Marked permissive constructors and translation-related parameters as deprecated; deprecated a translation interface and related extension methods.
REFACTOR
permissive constructors and translation-related parameters as deprecated; deprecated a translation interface and related extension methods.CHORE
Deprecates ANG, BGN, and ZWL currencies with appropriate migration paths.
NEW FEATURES
XCG (Caribbean Guilder) and ZWG (Zimbabwean Gold) currencies with translations (across 100+ locales each).ANG, BGN, and ZWL currencies with appropriate migration paths.FIX
CIV to "Pobrežie Slonoviny".KGS to "Kyrgyzstani Som".GYD to "Guyanese Dollar".DOCUMENTATION
CountryName's short flag (true) in toString() override returns common name, same way, as in parent's (TranslatedName class) override.
FIX
CountryName's short flag (true) in toString() override returns common name, same way, as in parent's (TranslatedName class) override.CHORE
Marked certain currencies as deprecated and updated related comments.
FIX
subunitToUnit value for Hungarian Forint.NEW FEATURES
REFACTOR
is* getters in favor of direct type checks.CHORE
DOCUMENTATION
TEST
Added new collections and extensions for mapping currencies and languages to countries (via byCountryMap method), including support for unofficial and
NEW FEATURES
byCountryMap method), including support for unofficial and constructed languages.CHORE
languages lists for Ethiopia and Iraq to reflect additional recognized languages.DOCUMENTATION
Enhance ISO standardized classes with Comparable interface and update bool getters.
NEW FEATURES
Comparable interface and update bool getters.CHORE
REFACTOR
DOCUMENTATION
TEST
This is a maintenance release without significant changes for the users, which aims to improve documentation and DevEx.
This is a maintenance release without significant changes for the users, which aims to improve documentation and DevEx.
NEW FEATURES
regionalCode getter to the BasicTypedLocale to provide a convenient alias for the countryCode property, improving consistency when working with regional locales.DOCUMENTATION
CHORE
Nullable maybeCommonNameFor method now accepts nullable mainLocale parameter - if null is provided, null will be returned.
REFACTOR
maybeCommonNameFor method now accepts nullable mainLocale parameter - if null is provided, null will be returned.Improved generics handling in localization methods.
REFACTOR
DOCUMENTATION
The commonNamesCacheMap is deprecated because it relies on the memory-intensive translations getter.
🎉 Second anniversary and new major release!
NEW FEATURES
commonNamesMap on ISO collections and commonNameFor/maybeCommonNameFor on ISO objects. These methods are significantly faster than the old translations - related methods because they work directly with locale-specific maps instead of iterating through all translations of each ISO object.translations getter is now a computed field. This means it will only generate the translations when they are requested, rather than storing them all in memory. It's recommended to cache the results of the getter to avoid redundant calculations. Because of that - translation and maybeTranslation methods are no longer recommended for retrieving localization data.commonNamesCacheMap is deprecated because it relies on the memory-intensive translations getter.IsoTranslated objects simplify complex queries for object localizations.IsoStandardized objects can now be applied to null values. For example, maybeIso.isRus will return false if maybeIso is null, without the need for additional null-checks.FIX
BREAKING CHANGES
IsoTranslated<T, N, L> class now uses three generic types instead of two. If you used this class directly in your code, simply add the additional generic <L extends BasicLocale> to your reference.toString() implementation of BasicLocale now uses Flutter's Locale-like output format. You can still access the old output by setting the short flag to false.sealed_country_translations library is deprecated. Migrate to the l10n_countries package or use l10n getter in ISO objects that provides the same data without holding all translations in memory. This sub-library and its content (except for supported locales lists - they will be moved to the main library) will be removed in the next major package version.BasicTypedLocale instead of BasicLocale, if you didn't used country value - this change will not affect you, otherwise please change from:BasicLocale(*, countryCode: "US");
to:
BasicTypedLocale(*, regionalCode: "US"); // or BasicTypedLocale(*, country: CountryUsa());
Updated the postal code pattern format for Paraguay.
NEW FEATURES
toString() method implementations in models and addressing new lints + DCM reports.namesNative array.> This is the last minor version update with significant changes for some time. The next steps will be patches at most. Currently working on v2.0.0 wh
This is the last minor version update with significant changes for some time. The next steps will be patches at most. Currently working on v2.0.0 which will bring new data and a big feature there, very likely without breaking the existing API.
NEW FEATURES
GlobalMaterialLocalization + GlobalCupertinoLocalizations locales.locale parameter in the maybeTranslation method is now nullable.permissive constructors are now even more permissive, only name and code parameters remain required.unMember field to false and fix Cape Verde coordinates Link to MR🦾 Language translations now also support all GlobalMaterialLocalization + GlobalCupertinoLocalizations locales.
NEW FEATURES
GlobalMaterialLocalization + GlobalCupertinoLocalizations locales.internationalName getter in IsoStandardized interface, representing the international name of the ISO object.UpperCaseMap class, that UpperCaseIsoMap extends, a simple version of UpperCaseIsoMap without key length checks and IsoStandardized values requirement.map in the RegionalBloc is now UpperCaseMap (with all it's benefits).maybeFromAcronym factory method in the RegionalBloc.BasicLocale class, that TranslatedName extends. Representing a type-safe world locale (language, country/region code and script).commonNamesCacheMap method for all ISO based sealed classes collections, which allows to create a cache map of common names translations for the given BasicLocale.BREAKING CHANGES
Because of the BasicLocale changes (described above), translation() and maybeTranslation() methods on the Translated classes now require BasicLocale input. If you are not using those methods directly, then you don't need to change anything, otherwise you will need to do small adjustment - wrap the content of those methods with a BasicLocale.
Before:
print(iso?.maybeTranslation(LangPor()));
After:
print(iso?.maybeTranslation(BasicLocale(LangPor())));
Or just:
(translation\()(.*)(\))$1BasicLocale($2)$3Fix thousands separator for CHF.
NEW FEATURES
codeOther is no longer nullable (in all IsoStandardized classes).UpperCaseIsoMaps) in every ISO class (accessible as static constants via .map, .codeMap, .codeNumericMap, etc.).IsoStandardized classes now allow non-String inputs - any Object, for example you can now use StringBuffer or Enum instances directly: enum IsoEnum {de, fr, ar} // On .fromCode(IsoEnum.de) call it will use "DE" input.
or you can basically use any custom class with toString() override:
class CustomIsoCodeClass {
const CustomIsoCodeClass({String code = '123', this.foo}) : _code = code;
final String _code;
final Foo? foo;
@override
String toString() => _code; // Has to override toString() with ISO value.
}
// On .fromAnyCode(CustomIsoCodeClass(code: ' 321 ')) call it will use "321" input.
REFACTOR
maybeMapIsoCode method.Added new static maybeFrom* methods and refactored old ones. They are also now accept any Object? input instead of just String?.
NEW FEATURES
maybeFrom* methods and refactored old ones. They are also now accept any Object? input instead of just String?.firstIsoWhere* extensions on ISO iterables.is* boolean getters for example:if (isoObject.isFra) return _onFrance();
is more readable and shorter equivalent of this check:
if (isoObject == const CountryFra()) return _onFrance();
Added new constructor called permissive - which allow the creation of custom class instances that are not fully compatible with the ISO standard.
NEW FEATURES
permissive - which allow the creation of custom class instances that are not fully compatible with the ISO standard.Translated class is now sealed - which means you can now directly compare instances of different ISO classes directly (for example in switch statements).Removed code marked as Deprecated in previous releases.
🎉 First anniversary and first stable release!
NEW FEATURES
TranslatedName name called common, which might be useful in some cases when name is being used by a parent class.BREAKING CHANGES
Deprecated in previous releases.FiatCurrency.list with a new FiatCurrency.listExtended.FiatCurrency.regularList (please use FiatCurrency.list instead).Deprecated (currencies).Added new interface IsoTranslated which combines Translated and IsoStandardizedinterfaces.
NEW FEATURES
IsoTranslated which combines Translated and IsoStandardizedinterfaces.standard* static constants in the WorldCountry class referencing different names of the ISO 3166-1 standard.standard* static constants in the FiatCurrency class referencing different names of the ISO 4217 standard.Added new factories to WorldCountry - fromCodeNumeric which returns instance by it's numeric code and fromAnyCode, which do the length and type checks
NEW FEATURES
WorldCountry - fromCodeNumeric which returns instance by it's numeric code and fromAnyCode, which do the length and type checks and redirects to other fromCode\* constructorsWorldCountry - maybeFromAnyCode, which works same way as fromAnyCode, but doesn't throws StateErrors if no currency object is found.maybeMapIsoCode method to String extensions, which is used under the hood of (maybe)fromAnyCode.REFACTOR
short, defaults to true).TranslatedName class by default returns .name value on toString().toString() methods.WorldCountry class now contains way more translations of language name to other languages (79 translations for each language minimum).
NEW FEATURES
WorldCountry class now contains way more translations of language name to other languages (79 translations for each language minimum).regularList getter for the list of regular currencies (excludes 10 currencies from the specialPurposeList).FiatCurrency class now contains translations of language name to other languages (79 translations for each language minimum).translation and maybeTranslation methods.TranslatedName class for the translations.Named and Translated.Script, based on the ISO 15924 standard.NaturalLanguage class now contains information about scripts (writing systems) and translations of the language name to other languages.FIX
Added copyWith, toJson etc. to the WorldCountry, FiatCurrency, NaturalLanguage classes.
NEW FEATURES
copyWith, toJson etc. to the WorldCountry, FiatCurrency, NaturalLanguage classes.IsoStandardized, JsonEncodable) and typedef (JsonMap) to the model.List<TranslatedName> instead of List<CountryName>, however CountryName is just an extension on top of TranslatedName (you can reference to name instead of common and fullName instead of official). There will be way more translations provided in upcoming version 0.7.0.Factory constructors and static methods for data classes creation now implicitly trimming and comparing uppercase string inputs.
dev_dependencies.FIX
BREAKING CHANGES
WorldCountry.list is now sorted alphabetically by the (3 letter) code.REFACTOR - Updates in dev_dependencies.
REFACTOR
dev_dependencies.DOCUMENTATION - Provided structure screenshot.
DOCUMENTATION
Increase code coverage to 100%.
TEST
Provided code coverage links and badge.
DOCUMENTATION
- Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →