world_flags 2.0.1 copy "world_flags: ^2.0.1" to clipboard
world_flags: ^2.0.1 copied to clipboard

Country flags made with Flutter - every flag is a Widget, without any assets.

2.0.1 #

REFACTOR

  • Improved generics handling in localization methods.
  • Update and use stable L10N packages.

DOCUMENTATION

  • Improved documentation and example.
  • Fixed typos in the README.

2.0.0 #

🎉 Second anniversary and new major release!

NEW FEATURES

  • Introduced new methods for working with common names and common name maps: 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.
  • The 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 retriving localization data.
  • The commonNamesCacheMap is deprecated because it relies on the memory-intensive translations getter.
  • New localization delegates on IsoTranslated objects simplify complex queries for object localizations.
  • Bool getters on 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

  • Replaced deprecated Color methods .withOpacity with new .withAlpha
  • Changed official name for Portugal: "República português" > "República Portuguesa".
  • Change the capital of Indonesia for Nusantara: "Jakarta" > "Nusantara".

BREAKING CHANGES

  • The package now requires Flutter v3.27.1 or higher.
  • The 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.
  • The default 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.
  • The 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 package version.
  • Country translation methods requires 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());

1.1.1 #

NEW FEATURES

  • Updated postal code pattern a format for Paraguay.
  • Updated International Olympic Committee (IOC) country code for Bahrain.
  • Improvements of toString() method implementations in models and addressing new lints + DCM reports.
  • Added "polski" to the Polish language namesNative array.

1.1.0 #

NEW FEATURES

  • Added 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).

1.0.0 #

🎉 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

  • New asserts in the constructors and optimizations in several country flag painters.

TESTS

  • Added tests for new asserts and update goldens with arabic fonts.

0.8.0 #

NEW FEATURES

  • CountryFlag now have non-required child property.

DOCUMENTATION

  • Fully document all the public members of the package.

0.7.0 #

TESTS

  • Added unit, widget and golden tests for the package with code coverage around 100%.
  • Small refactoring related to the linter rules.

0.6.0 #

NEW FEATURES

  • Two new properties in the FlagThemeData - width and height. Those will be also used in the CountryFlag and in aspect ratio calculation (if no aspectRatio is provided) if specified.

0.5.0 #

NEW FEATURES

  • Updated README and example.
  • Updated some simplified world country flags and also a fullFlags list.

New full flags:

  • North Macedonia (MKD)
  • Barbados (BRB)
  • Eritrea (ERI)
  • Papua New Guinea (PNG)
  • Slovakia (SVK)
  • Tajikistan (TJK)

Updated simplified flags:

  • Brazil (BRA)
  • Malta (MLT)
  • Albania (ALB)
  • Belarus (BLR)
  • Spain (ESP)
  • Croatia (HRV)
  • Iran (IRN)
  • Kenya (KEN)
  • Cambodia (KHM)
  • Lebanon (LBN)
  • Liechtenstein (LIE)
  • Lesotho (LSO)
  • Montenegro (MNE)
  • Portugal (PRT)
  • San Marino (SMR)
  • Serbia (SRB)
  • Slovenia (SVN)
  • Turkmenistan (TKM)
  • Uganda (UGA)
  • Vatican City (VAT)
  • Vanuatu (VUT)
  • Zambia (ZMB)

0.1.0 #

NEW FEATURES

  • 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 list).

0.0.1 #

NEW FEATURES

  • Provided 225 out of all 250 small and simplified world country flags.

0.0.0 #

  • Initial release.
11
likes
0
points
1.3k
downloads

Publisher

verified publishertsin.is

Weekly Downloads

Country flags made with Flutter - every flag is a Widget, without any assets.

Repository (GitHub)
View/report issues

Topics

#flags #flag #country-flags #country-flag #coat-of-arms

License

unknown (license)

Dependencies

flutter, sealed_countries

More

Packages that depend on world_flags