NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #2820 most downloaded on pub.dev
The first and only collection of declaratively defined world flags. No assets.
Last release 12 days ago
26 Sep 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 30 of 30 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
30 releases · first in 2024
Back to the 95/100 score 🎉
Back to the 95/100 score 🎉
CHORE
`FlagThemeData`: Deprecated in favor of DecoratedFlagData and FlagTheme(data: ...). Will be removed in the next major release to eliminate package:flu…
Last big update ahead of the upcoming year-end major release. This version refreshes flag visuals, optimizes rendering performance, and decouples theming from Material.
DEPRECATIONS
FlagThemeData: Deprecated in favor of DecoratedFlagData and FlagTheme(data: ...). Will be removed in the next major release to eliminate package:flutter/material.dart dependencies (see FLAG_THEME_MIGRATION.md).child Property: Deprecated across flag interfaces and constructors in favor of flagChild (resolves naming conflict with InheritedTheme.child).SimpleShieldPainter.outlinedWithDividers, SimpleShieldPainter.withDividers, and UnionJackPainter.halfWithDividers. Use the corresponding *WithoutDividers and *WithoutOutline constructors instead.TLDR: Here what the new FlagTheme usage looks like:
+ FlagTheme( // <-- Here:
+ data: FlagThemeData(), // <-- Ideally use `DecoratedFlagData()`, same API
child: MaterialApp(
- theme: ThemeData(extensions: [FlagThemeData()]), // <-- Move this.
home: ...,
),
+ )
NEW FEATURES
FlagTheme & Material Decoupling:
DecoratedFlagData as the core data contract for flags.FlagTheme (InheritedTheme) as a standalone widgets-only theme carrier with maybeOf, of, fallbackResolvers, and FlagThemeData.lerpStatic.flagChild across all flag interfaces, models, and constructors to replace child.AIA), Andorra (AND), Bermuda (BMU), Ecuador (ECU), Fiji (FJI), Falkland Islands (FLK), British Indian Ocean Territory (IOT), Jersey (JEY), Montserrat (MSR), Pitcairn (PCN), South Georgia (SGS), and Turks and Caicos (TCA).GIB), Dominica (DMA), Zimbabwe (ZWE), Cayman Islands (CYM), and Kyrgyzstan (KGZ), including related currency and language dual flags (GIP, ZWG, etc.).CustomElementsPainter.proportionalBounds to preserve fixed aspect ratio artwork during flag scaling.IMPROVEMENTS
saveLayer passes.BadgeArtwork polygon tables built once per size.isSimplified: true from AIA, FJI, JEY, MSR, KGZ and TCA.RectanglePainter.rectangleBounds, eliminated cross-platform golden test skips by replacing rasterizer-sensitive clip paths with cubic fills, and resolved painter TODOs in DavidStarPainter, AlmondPainter, and TaegukgiPainter.FIX
FlagThemeData.operator == where specifiedAspectRatio was compared against aspectRatio.KOR) taeguk hairline rendering seam caused by adjacent half-disc fills.ZWE) bird scale relative to the star.TEST
flag_draw_ops_test.dart to enforce per-flag canvas command budgets recorded in flag_draw_ops.json.SimpleShieldPainter, ElementsPainter.calculateSize, and BadgeArtwork.flag_list_perf_test.dart).CHORE
DOCUMENTATION
skills/world-flags-widgets), compliant with the Agent Skills specification, installable via dart run skills@ get.INHERITED
Inherited from sealed_countries 3.4.0:
NRU/NR is now named "Naoero" ("Republic of Naoero" officially), following the United Nations' update of the country's name. This package re-exports sealed_countries, so any flag list, picker, or label showing name.common will display the new name. Flag artwork and all codes are unchanged.IMPROVEMENTS
Inherited from sealed_countries 3.4.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.One column per month.
Deprecated sub-classing Region, LanguageFamily and WritingSystem via @Deprecated.subclass(...) to prepare for making them final in the next major vers…
FIX
DualFlag was only applied to the background flag and not the foreground flag. Now both flags in DualFlag correctly receive the decoration.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.CHORE
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
Deprecated StarFlag, MoonFlag, EllipseFlag, RectangleFlag, TriangleFlag, and MultiElementFlag — use BasicFlag(properties) instead. These subclasses wi…
NEW FEATURES
DualFlag widget — displays two flags split by a configurable angle (default 45°) for a given ISO item. When both primary and secondary flags exist, renders a split view; otherwise falls back to a single flag.CurrencyFlag widget — renders a country flag for a given FiatCurrency, with built-in default mappings for all fiat currencies to their primary country flags. Also provides secondary country flag mappings for dual-flag display.LanguageFlag widget — renders a country flag for a given NaturalLanguage, with built-in default mappings for all natural languages to their primary country flags (including constructed languages). Also provides secondary country flag mappings for dual-flag display.DualFlagClipper — a CustomClipper that clips along a line through the center at any angle, supporting horizontal, vertical, and diagonal splits.MaybeWidget — a utility widget for conditionally wrapping or building widgets.copyWith extensions for FlagProperties, ElementsProperties, and CustomElementsProperties.copyWith methods across the ecosystem now support resetting nullable fields to null via domain-invalid sentinel values (see underlying packages for details). In this package: pass a negative value for positive-only double?/int? fields (height, width, aspectRatio, widthFactor, angle), and an empty list for List? fields (elementsProperties).REFACTOR
BasicFlag now auto-resolves the elements painter from FlagProperties.baseElementType when no explicit elementsBuilder is provided. This means BasicFlag(properties) is now sufficient for all standard flag types (star, rectangle, ellipse, moon, triangle, multi-element) — the correct painter is selected automatically at build time.StarFlag, MoonFlag, EllipseFlag, RectangleFlag, TriangleFlag, and MultiElementFlag — use BasicFlag(properties) instead. These subclasses will be removed in the next major version.BasicFlag in all flag maps.baseElementTypes to flagChlProperties, flagChnProperties, flagDjiProperties, flagEthProperties, and flagEurProperties.IsoFlag, CurrencyFlag, LanguageFlag, DualFlag) into a dedicated flags/iso/ subdirectory.MaybeWidget from world_countries to world_flags package.show clauses.CHORE
sealed_countries to v3.1.0 — added RTL support for phone code formatting (isRtl parameter in phoneCode()).Added item comparison to FlagShaderSurface change detection logic to ensure proper updates when the item changes.
REFACTOR
item comparison to FlagShaderSurface change detection logic to ensure proper updates when the item changes.NplPainter) stroke paint configuration by explicitly setting strokeMiterLimit to prevent miter-to-bevel fallback on acute angles. This ensures the triangle apexes render as sharp points regardless of the flag's aspect ratio.DOCUMENTATION
platforms section to pubspec.yaml to explicitly declare support for all official Flutter platforms.BREAKING CHANGES (in underlying Dart packages)
🎉 Third anniversary and new major release!
NEW FEATURES
Animated shader delegate system (AnimatedFlagShaderDelegate, StaticFlagShaderDelegate).
Pixel ratio support in flag shaders.
New namesCommonNative method on ISO (IsoTranslated) classes, returning the native name for the given locale as a single string.
Enhanced locale parsing to support three-letter codes.
BREAKING CHANGES
Moon class now uses offsetDx and offsetDy parameters instead of Offset offset to enable @pragma("vm:deeply-immutable") optimization.Migration Guide:
If you're using the Moon shape directly in your code:
// Before
const moon = Moon(radius: 0.8, offset: Offset(0.25, 0));
// After
const moon = Moon(radius: 0.8, offsetDx: 0.25, offsetDy: 0);
If you're accessing the offset field:
// Before
final offsetX = moon.offset.dx;
final offsetY = moon.offset.dy;
// After
final offsetX = moon.offsetDx;
final offsetY = moon.offsetDy;
This change improves performance by allowing the Dart VM to optimize Moon instances as deeply immutable, which was previously blocked by the Offset type (from the dart:ui library).
BREAKING CHANGES (in underlying Dart packages)
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.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".REFACTOR
permissive ISO constructors and translation-related parameters as deprecated; deprecated a translation interface and related extension methods.CHORE
DOCUMENTATION
Improve Norfolk Island (NF) flag.
NEW FEATURES
REFACTOR
isSimplified: true to isSimplified: null across multiple countries.DOCUMENTATION
pubspec.yaml and README.md).isSimplified property with detailed explanations.Made Shape implementations final; added deprecations for legacy helpers (to be replaced with modern switch expressions).
NEW FEATURES
GgyPainter) and export, so GGY is no longer a "simplified" flag.REFACTOR
Shape implementations final; added deprecations for legacy helpers (to be replaced with modern switch expressions).FIX
CountryName's short flag (true) in toString() override returns common name, same way, as in parent's (TranslatedName class) override.CHORE
Deprecated ineffective anti-aliasing override flagAntiAliasOverride properties and improved anti-aliasing handling in flag rendering.
FIX
subunitToUnit value for Hungarian Forint.NEW FEATURES
copyWith extension for IsoFlag, also exposed flag data maps map and alternativeMap via public getters for easier access.FlagElementsType? baseElementType to flag data FlagProperties indicating the base geometric or symbolic element of each flag, enhancing metadata and classification.isSimplified property to flag definitions, allowing users to distinguish between simplified and fully detailed flags.REFACTOR
flagAntiAliasOverride properties and improved anti-aliasing handling in flag rendering.fullFlags list in favor of new isSimplified property.is* getters in favor of direct type checks.CHORE
DOCUMENTATION
TEST
Deprecated outdated Afghanistan flag and updated references to its alternative.
FIX
ShahadaPainter translation logic.NEW FEATURES
IsoFlag widget and DecoratedFlagWidget base class.height and width parameters to the BasicFlag.byCountryMap method), including support for unofficial and constructed languages.CHORE
foregroundWidget parameter in flag widgets, in favor of child one.languages lists for Ethiopia and Iraq to reflect additional recognized languages.CHORE - Flag of Syria update.
CHORE
Improve Iraq flag painter aspect ratio change handling.
NEW FEATURES
Comparable interface and update bool getters.CHORE
REFACTOR
DOCUMENTATION
TEST
Deprecated flagTextStyleOverride getter and setter (visible for testing) as text-based painters were removed.
NEW FEATURES
regionalCode getter to the BasicTypedLocale to provide a convenient alias for the countryCode property, improving consistency when working with regional locales.DOCUMENTATION
REFACTOR
flagTextStyleOverride getter and setter (visible for testing) as text-based painters were removed.This is maintenance release without significant changes for the users, that aims to improve DevEx when working with flags in DevTools.
This is maintenance release without significant changes for the users, that aims to improve DevEx when working with flags in DevTools.
NEW FEATURES
debugFillProperties, providing detailed flag property information, including values and rationales. Crucially, this allows you to visualize emoji flags directly in dev tools, replacing generic widget names.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
Color methods .withOpacity with new .withAlphaBREAKING 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 removed. 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.Added FlagExtension on WorldCountry to provide flag-related properties and colors:
NEW FEATURES
FlagExtension on WorldCountry to provide flag-related properties and colors:
flagStripeColors: Retrieves the stripe colors of the flag from FlagProperties.flagElementsColors: Retrieves the element colors of the flag from FlagProperties.flagColors: Combines flagStripeColors and flagElementsColors into a single list of colors.flagProperties: Retrieves the FlagProperties associated with country (from the default WorldCountry.list).CountryFlag now offers alternativeMap parameter that you can use to provide alternative look of the country flag. By default it contains updated Afgha
🎉 First stable release!
NEW FEATURES
CountryFlag now offers alternativeMap parameter that you can use to provide alternative look of the country flag. By default it contains updated Afghanistan flag (with official design from year 2021) and alternative French Guiana flags.REFACTOR
TESTS
CountryFlag now have non-required child property.
NEW FEATURES
CountryFlag now have non-required child property.DOCUMENTATION
Added unit, widget and golden tests for the package with code coverage around 100%.
TESTS
Two new properties in the FlagThemeData - width and height. Those will be also used in the CountryFlag and in aspect ratio calculation (if no aspectRa
NEW FEATURES
FlagThemeData - width and height. Those will be also used in the CountryFlag and in aspect ratio calculation (if no aspectRatio is provided) if specified.Updated some simplified world country flags and also a fullFlags list.
NEW FEATURES
fullFlags list.New full flags:
Updated simplified flags:
Provided all 250 small and simplified world country flags, but at the same time 2/3 of these flags can be used as full-dimensional flags (fullFlags li
NEW FEATURES
fullFlags list).Provided 225 out of all 250 small and simplified world country flags.
NEW FEATURES
- Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →