NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #4286 most downloaded on pub.dev
Sealed world data in form of Flutter widgets (country, phone, currency pickers, etc.).
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 40 of 40 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
40 releases · first in 2023
One column per quarter.
Updated material_ui dependency to v1.4.0 (v1.3.0 was retracted by Google).
CHORE
REFACTOR
ListItemTile now passes leading and subtitle through untouched unless it has to hide them or label them with a semanticsIdentifier; an empty Semantics is still a render object the tree walks. A missing slot keeps its node, so tiles lay out exactly as before.GestureDetector in IndexedListViewBuilder is excluded from semantics when the row is a ListItemTile with an onPressed, whose own ink well already exposes the selection. A tile without onPressed, and any custom row, keeps it, so a screen reader can still select it.List: rows are read by index, and Map.keys walked from the start for each one (~40× slower per row, measured).IMPROVEMENTS
barrierLabel parameter), improving accessibility for assistive technologies.debugFillProperties diagnostics across AdaptiveSearchTextField, ClearButton, IsoTile, ListItemTile, SearchListListenableBuilder, SearchableIndexedListViewBuilder, StatefulIndexedListView, and StatefulSearchable, resolving all diagnostic_describe_all_properties lints.IsoDiagnosticsProperty from world_flags into ListItemTile.debugFillProperties for detailed diagnostic representation of ISO-standardized objects._AdaptiveSearchTextFieldState and _SearchListListenableBuilderState to follow member privacy best practices and eliminate lint suppressions.TEST
debugFillProperties across all modified widgets and their private state representations, maintaining 100% code coverage.chore(deps): update sdk constraints and world_flags dependency
chore(deps): update sdk constraints and `world_flags` dependency (#582)
chore(deps): update sdk constraints and world_flags dependency
Big update refreshing flag visuals and performance across all pickers, introducing zero-touch Material theme bridging, and decoupling from Material theme extensions ahead of the upcoming year-end major release.
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
BasicPicker, IsoTile, etc.) and picker themes now accept any DecoratedFlagInterface instead of the deprecated FlagThemeData.world_flags's FlagThemeData with a local, backward-compatible deprecated shim implementing DecoratedFlagInterface and ThemeExtension.ThemeExtension to FlagTheme.fallbackResolvers via internal resolvers. Existing ThemeData(extensions: [FlagThemeData(...)]) setups require zero code changes.world_flags 3.5.0:
FlagTheme Carrier: Added standalone FlagTheme (InheritedTheme) carrier with maybeOf, of, fallbackResolvers, and FlagThemeData.lerpStatic.AIA, AND, BMU, ECU, FJI, FLK, IOT, JEY, MSR, PCN, SGS, TCA) and 5 emblem painters (GIB, DMA, ZWE, CYM, KGZ), including related currency and language dual flags (GIP, ZWG, etc.).CustomElementsPainter.proportionalBounds to preserve aspect ratio during flag scaling.flagChild across all flag interfaces, models, and constructors to replace child.IMPROVEMENTS
saveLayer passes.BadgeArtwork polygon tables built once per size.availableLocales is now built on first read instead of in the constructor, making localize() calls ~15% faster.isSimplified: true from AIA, FJI, JEY, MSR, 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
NRU/NR is now officially named "Naoero" ("Republic of Naoero"), following the United Nations' update. All pickers, flag lists, and labels reflect the new name.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.DOCUMENTATION
skills/world-countries-pickers), compliant with the Agent Skills specification, installable via dart run skills@ get.TEST
picker_perf_test.dart with perf_driver.dart to benchmark picker scrolling and flag rendering under --profile.flag_draw_ops_test.dart canvas command budget enforcement and unit tests for painters and badge geometry.CHORE
world_flags to v3.5.0.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.NEW FEATURES
@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: bump world_flags to v3.2.0 and update dart version to v3.12.0
chore: bump world_flags to v3.2.0 and update dart version to v3.12.0
- Updated the world_flags dependency version to ^3.2.0.
- Bumped the Dart SDK version to ^3.12.0 in pubspec.yaml.
- Added a chore entry in CHANGELOG.md for the SDK bump.
NEW FEATURES
fromEnums and toEnums extension methods are added to SealedWorldNullableIterableIsoExtension to facilitate mapping between ISO objects and enums.cacheExtent property in IndexedListViewBuilder with a new recommended implementation.TEST
CHORE
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, is moved to the world_flags package.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).isRtl getter to BuildContextExtension for convenient RTL detection via context.isRtl.REFACTOR
EdgeInsets.only(left:, right:) with EdgeInsetsDirectional.only(start:, end:) in UiConstants.padding for proper RTL support.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.DOCUMENTATION
localizationsDelegates example in README to include GlobalWidgetsLocalizations.delegate (required for proper Directionality detection).FIX
BasicPickerFlagsExtension.adaptFlags so that the locale country's flag now takes precedence over pre-existing map entries (e.g. the generic EU flag for EUR). Previously, currencies like EUR would always show the default flag even when the locale country (e.g. Austria) uses that currency; now the Austrian flag is shown instead. The same fix applies to language flags.CHORE
world_flags to v3.1.0 — which includes RTL support from sealed_countries v3.1.0 and sealed_currencies v3.1.0.Synced with Flutter 3.41 SDK — replaced deprecated widget members with their updated counterparts and adopted newly introduced parameters.
Synced with Flutter 3.41 SDK — replaced deprecated widget members with their updated counterparts and adopted newly introduced parameters.
NEW FEATURES
flagTheme override to all pickers and picker theme data.hitTestBehavior to indexed list views, pickers, and picker themes.ClearButton now uses onPressed when provided and falls back to clearing the
controller when it is null.REFACTOR
textScaleFactor with textScaler in EmojiFlag due to PANA score penalty.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.CHORE
DOCUMENTATION
TEST
ClearButton to verify custom onPressed behavior and default controller clearing.BREAKING CHANGES (in underlying Dart packages)
NEW FEATURES
Animated shader delegate system (AnimatedFlagShaderDelegate, StaticFlagShaderDelegate).
Pixel ratio support in flag shaders.
Adds FlagShaderSurface widget with WavedFlagShaderDelegate for real-time GPU-based flag animations
Introduces FlagShaderOptions for controlling wave parameters, turbulence, lighting, and fabric appearance
Generic IsoTile<T> widget consolidating all tile implementations.
SearchData model for structured, multi-variant search terms (e.g. for fuzzy search).
L10nSorter typedef for locale-aware alphabetical sorting.
MapIsoL10nExtension.sortAlphabetically for sorted translation maps.
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.
L10N tree-shakable via dart define flags.
Picker's locale-aware sorting support via L10nSorter typedef and MapIsoL10nExtension.
BREAKING CHANGES (in underlying Dart packages)
TypedLocaleDelegate now has a non-null fallbackLanguage parameter.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.
BREAKING CHANGES (in this package)
TypedLocale to IsoMaps class. Access via locale.maps.countryTranslations.builder renamed to itemBuilder with new signature (props, defaultTile).TypedLocaleDelegate params to IsoCollections class.translation/flagsMap params replaced with single maps param, items are now nullable.searchIn returns SearchData instead of Iterable<String>. resultsBuilder gains query param.BasicPicker and related mixins require second type argument for tile type.CurrencyPicker.adaptiveFlags(), LanguagePicker.adaptiveFlags() constructors. Flags are now default for all pickers.See human (but also LLM-agent adjusted) MIGRATION_GUIDES.md for migration guide. Just provide it to your LLM of choice and let it help you with the migration.
REFACTOR
CountryTile, CurrencyTile, LanguageTile are now typedefs of IsoTile<T>.defaultBuilder methods.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.DOCUMENTATION
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
MaybeWidget gains a new optional buildWhen predicate parameter (all constructors) allowing additional conditional logic beyond simple null checks. Whe
NEW FEATURES
MaybeWidget gains a new optional buildWhen predicate parameter (all constructors) allowing additional conditional logic beyond simple null checks. When provided and returns false, the widget (or list / nullable result) is skipped and the fallback (orElse / empty list / null) is used.MaybeWidget.orNull - builds and returns a widget only when the provided value is non-null (and an optional buildWhen predicate, if supplied, returns true); otherwise it returns null (instead of inserting an empty placeholder). This is ideal for concise conditional inclusion in collection literals or nullable child parameters.isZero getter on num? (in helpers library).maybeScaffold and maybeMessenger getters (in extensions on BuildContext, helpers library).REFACTOR
searchSuggestions builder (with new ListTile parameters, provided in Flutter SDK v3.35.4).@useResult (and other) annotations and updated interfaces.copyWith methods for validation.isSimplified: true to isSimplified: null across multiple countries.DOCUMENTATION
homepage in pubspec.yaml.isSimplified property with detailed explanations.Deprecated static method TypedLocaleDelegate.maybeOf(context) in favor of TypedLocaleDelegate.of(context).
NEW FEATURES
GgyPainter) and export, so GGY is no longer a "simplified" flag.REFACTOR
TypedLocaleDelegate.maybeOf(context) in favor of TypedLocaleDelegate.of(context).Shape implementations final; added deprecations for legacy helpers (to be replaced with modern switch expressions).FIX
CountryTile title alignment so it centers with the flag.CountryName's short flag (true) in toString() override returns common name, same way, as in parent's (TranslatedName class) override.CHORE
DOCUMENTATION
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
.adaptiveFlag constructor), automatically displaying the most relevant flag based on locale or user context. For example - they automatically show the most relevant flag based on the user's device locale, like showing the Austrian flag 🇦🇹 for the German language if the user is in Austria.flagsMap parameter).ClearButton now extends IconButton so it supports all its super parameters, plus several params from the AnimatedCrossFade widget.IsoFlag widget and DecoratedFlagWidget base class.height and width parameters to the BasicFlag.byCountryMap method), including support for unofficial and constructed languages.CHORE
meta package has been added as an explicit dependency, but it has the same version constraints as the current stable Flutter SDK version (3.32.4).foregroundWidget parameter in flag widgets, in favor of child one.languages lists for Ethiopia and Iraq to reflect additional recognized languages.Add additional ListTile super parameters to the ListItemTile widget.
NEW FEATURES
ListTile super parameters to the ListItemTile widget.spacing and new Flutter 3.32.0 parameters (in show* methods) in pickers.ListItemTile.Comparable interface and update bool getters.CHORE
REFACTOR
ListItemTile structure for direct item property access.DOCUMENTATION
TEST
ListItemTile extension functionality.Deprecated flagTextStyleOverride getter and setter (visible for testing) as text-based painters were removed.
NEW FEATURES
onSearchResultsBuilder parameter, enabling advanced search algorithms like fuzzy search.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.TESTS
This is a DevEx release without significant changes for the users, that aims to improve developer experience when working with flags in DevTools.
This is a DevEx release without significant changes for the users, that aims to improve developer experience when working with flags in DevTools.
NEW FEATURES
CountryFlag, BasicFlag, MaybeWidget, etc. now override debugFillProperties, providing detailed information, including values and rationales. Crucially, this allows you to visualize emoji flags directly in dev tools, replacing generic widget names.CHORE
Highlight importance of TypedLocaleDelegate usage in app's localizationsDelegates, for pickers L10N and improved search functionality. Thanks @wildsur
DOCUMENTATION
TypedLocaleDelegate usage in app's localizationsDelegates, for pickers L10N and improved search functionality. Thanks @wildsurfer!REFACTOR
translation provided to the picker.translation from PickersThemeData.TypedLocaleDelegate.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.
This is maintenance release without significant changes for the users, that aims to fix dropped pub score after Flutter v3.29.0.
CHORE
scribbleEnabled is replaced with stylusHandwritingEnabled parameter in AdaptiveSearchTextField.Added two new offstage constructor and static list method, to MaybeWidget. MaybeWidget.offstage - Preserves layout space but hides the widget if the p
NEW FEATURES
offstage constructor and static list method, to MaybeWidget. MaybeWidget.offstage - Preserves layout space but hides the widget if the provided value is null. Ideal if you want to conditionally toggle visibility without removing the widget from the tree. MaybeWidget.list - Builds either a single widget or multiple widgets if value is not null, or returns an empty list if it is null. Gives you a flexible way to handle conditional UI blocks or spread-like usage in the Flex widgets.REFACTOR
maybeCommonNameFor method now accepts nullable mainLocale parameter - if null is provided, null will be returned.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.REFACTOR
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.BasicPicker, BaseTileThemeData and BaseTileThemeData are now inherited from IsoTranslated instead of Translated class.IsoLocale is now deprecated in favor of TypedLocale that now implements BasicTypedLocale instead of BasicLocale.base keyword on TypedLocale class are removed, you can still use new regionalCode parameter to provide non-typed region/country info there.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.localizationsDelegates: const [TypedLocaleDelegate()], to your app, for pickers L10N and improved search.BasicTypedLocale instead of BasicLocale, if you didn't used country value - this change will not affect you, same applies to TypedLocale. If you provided non-typed country data there - please change from:BasicLocale(*, countryCode: "US");
// or
TypedLocale(*, country: "US");
to:
BasicTypedLocale(*, regionalCode: "US"); // or BasicTypedLocale(*, country: CountryUsa());
// or
TypedLocale(*, regionalCode: "US"); // or TypedLocale(*, country: CountryUsa());
Added new method for the FunctionalPlatform - maybeWhen (in addition to hash-map like method maybeWhenConst that works with mostly immutable object re
NEW FEATURES
maybeWhen (in addition to hash-map like method maybeWhenConst that works with mostly immutable object returns (instead of closures in the new method)).showInSearch method pop handling.searchSuggestions method might be affected by the SDK bug fixed in v3.27.0. As a temporary workaround, you can create your own instance of SearchController and dispose of it manually.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).All previously deprecated code, marked with the @Deprecated annotation, has been removed. Including color font emojis (you can still use them on your…
BREAKING CHANGES
@Deprecated annotation, has been removed. Including color font emojis (you can still use them on your own via EmojiFlag.custom constructor, example code is provided in the example project).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.CountryFlag now have non-required child property.REFACTOR
TESTS
> Asset based EmojiFlags are being deprecated, but you can still use them until the next major update, you will be also able to use them after v2.0.0…
NEW FEATURES
The package now uses CountryFlag from the world_flags package to display flags in the default country and phone code pickers. This approach offers several benefits:
CountryFlag provides greater flexibility for customizing the appearance of flags.CustomPainter, they don't require additional platform dependant and heavy font assets.Asset based
EmojiFlags are being deprecated, but you can still use them until the next major update, you will be also able to use them after v2.0.0 withEmojiFlag.customif needed.
MaterialApp(
...
theme: ThemeData(
extensions: const <ThemeExtension>[
/// The `emojiFamily` will work until v2.0.0, with old, assets based flags.
CountryTileThemeData(emojiFamily: EmojiFamily.twemoji),
/// Instead you can migrate to FlagThemeData, where you can specify way more properties.
FlagThemeData(
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(4))),
),
],
)
);
🎉 All translations in the eco-system packages now support all GlobalMaterialLocalizations and GlobalCupertinoLocalizations locales.
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 MRDurationExtension to the helpers library.TypedLocaleExtension with a copyWithTranslationsCache(Async) method.asyncTranslationCacheProcessing parameter for the TypedLocaleDelegate.withTranslationsCache constructor for TypedLocale and IsoLocale.startWithSearch in the country and phone code pickers also to false, to unify behavior across the pickers.Deprecated maybeTranslate and translate methods for translated classes (use maybeTranslation and translation instead).
NEW FEATURES
GlobalMaterialLocalization + GlobalCupertinoLocalizations locales.TypedLocaleDelegate and it's new selectiveCache constructor. This is useful when you don't want to cache the translations for the specific unused ISO objects. For example you are only using country pickers, so you might not need currency an language translations. In this case you can provide only countriesForTranslationCache for the countries translation cache.TypedLocale (so and IsoLocale) has new fields for storing translations cache (see the point above).TypedLocale (so and IsoLocale) are now inherited from BasicLocale (so and JsonEncodable), so they can be used in the translations directly.copyWith method in in TypedLocale (so and IsoLocale).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).maybeTranslate and translate methods for translated classes (use maybeTranslation and translation instead).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)$3Use of UX/UI interpretation of Hick's Law for conditionally showing search bar in the SearchableIndexedListViewBuilder - If no showSearchBar value spe
NEW FEATURES
showSearchBar value specified, it uses PickersThemeData.showHeader value as before but instead of falling back to default hardcoded false value it fallbacks to items count condition if (items.length > 5).PickersThemeData.showHeader is now nullable.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 all ISO objects, for example:if (isoObject.isFra) return _onFrench();
is more readable and shorter equivalent of this check:
if (isoObject == const LangFra()) return _onFrench();
Added new constructor called permissive - which allow the creation of custom class instances that are not fully compatible with the ISO standard.
NEW FEATURES
Added new constructor called 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).
Added theme extensions that you can specify in your ThemeData to provide global theme to your pickers. You can find PickersThemeData, CountryTileThemeData, CurrencyTileThemeData and LanguageTileThemeData:
MaterialApp(
...
theme: ThemeData(
/// And also [CurrencyTileThemeData], [LanguageTileThemeData], [CountryTileThemeData]...
extensions: const <ThemeExtension>[
PickersThemeData(primary: true), // Specify global pickers theme.
],
)
);
This way you can specify for example that all your pickers lists are primary and define globally use of Twemoji as main flags font emoji family in all Country/Phone pickers in the app.
Removed code marked as Deprecated in previous releases.
🎉 First anniversary and first stable release!
NEW FEATURES
Added new getter for TranslatedName name called common, which might be useful in some cases when name is being used by a parent class.
Added a lot of translations from the Symfony.
Currencies translations now support all GlobalMaterialLocalizations and GlobalCupertinoLocalizations locales.
Updated LICENSE.
Added CLI tool for removing unused emoji font families on the Web platform dart run world_countries:clean_build [--keep twemoji,notoemoji,openmoji]
Added fromSubtags constructors for IsoLocale and TypedLocale classes.
Added defaultLocaleMapResolution for a TypedLocaleDelegate that maps:
fil Filipino (Pilipino) to tl Tagalog.gsw Swiss German Alemannic Alsatian to de_CH German (Switzerland).bs_Cyrl Bosnian (written in the Cyrillic script) to sr Serbian.BREAKING CHANGES
Deprecated in previous releases.FiatCurrency.list with a new FiatCurrency.listExtended.FiatCurrency.regularList (please use FiatCurrency.list instead).Deprecated (currencies).BuildContextExtension, FunctionalPlatform, NameTextInput, ClearButton and UiConstants. To migrate just use IDE suggestions or manually replace old references:import "package:world_countries/world_countries.dart";
to a new one:
import "package:world_countries/helpers.dart";
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.REFACTORING
NavigatorContextExtension from exports, so you don't need to specify it no longer via hide.Added new factories to ISO classes - fromAnyCode, which do the length and type checks and redirects to other fromCode\* constructors
NEW FEATURES
fromAnyCode, which do the length and type checks and redirects to other fromCode\* constructorsmaybeFromAnyCode, 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.TypedLocaleDelegate class, which can be used in the localizationsDelegates (such as in MaterialApp). It attempts to convert the string-based Locale to a strongly typed TypedLocale, which is then used in all pickers to provide translations for country/currency/language names. The detected TypedLocale? is also accessible via TypedLocaleDelegate.maybeOf(context) or simply context.maybeLocale.translation parameter (which will be used instead of the TypedLocale translation).REFACTOR
short, defaults to true).TranslatedName class by default returns .name value on toString().toString() methods.BREAKING CHANGE
TypedLocale as translation parameter (to migrate just wrap your previous language there with IsoLocale()).This is a general update that synchronizes underlying Dart package updates (related to translations and interfaces), as a preparation for a bigger upc
This is a general update that synchronizes underlying Dart package updates (related to translations and interfaces), as a preparation for a bigger upcoming update for localization delegates.
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
New searchSuggestions method in every picker (for use in suggestionsBuilder of SearchAnchor)
NEW FEATURES
suggestionsBuilder of SearchAnchor)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.REFACTOR
Factory constructors and static methods for data classes creation now implicitly trimming and comparing uppercase string inputs.
dev_dependencies.FIX
DOCUMENTATION
BREAKING CHANGES
WorldCountry.list is now sorted alphabetically by the (3 letter) code.Renamed BuildContextExtensions > BuildContextExtension
BuildContextExtensions > BuildContextExtensionREFACTOR
dev_dependencies.DOCUMENTATION - Provided structure screenshot.
DOCUMENTATION
TEST - Increase code coverage to 96%.
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 →