country_flags

Creator: coderz1093

Last updated:

Add to Cart

Description:

country flags

Country Flags #





A Flutter package for displaying the SVG image of a country's flag.
The flag can be generated using either a country code or a language code.
View the complete list of supported countries here.
For a list of supported languages, visit www.lingoes.net/en/translator/langcode.htm (please note that not all language codes on the list are supported).


Installation #
Simply add country_flags to your pubspec.yaml file.
dependencies:
country_flags: ^3.0.0
copied to clipboard
Usage #
Create a flag using a country code. #
CountryFlag.fromCountryCode('ES');
copied to clipboard
Create a flag from a language code #
CountryFlag.fromLanguageCode('en');
copied to clipboard
Tweak the size of the flag #
CountryFlag.fromLanguageCode(
'en',
width: 120,
height: 80,
);
copied to clipboard
Create a circular flag #
CountryFlag.fromCountryCode(
'ES',
shape: const Circle(),
);
copied to clipboard
Create a rectangular flag with rounded corners #
CountryFlag.fromCountryCode(
'ES',
shape: const RoundedRectangle(6),
);
copied to clipboard
Credits #
Special thanks to jovial_svg which is utilized to render the SVG images from binary files.
Many thanks to bgoncharuck for the implementation.
Acknowledgments to the flag-icons project for providing the necessary SVG flags.
Alternatives #

Flag

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.