GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ovenbits/country_flags: Easy to use library that allows you to render SVG flags of countries and languages

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

43 Commits
43 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
example
example
 
 
lib
lib
 
 
res
res
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
analysis_options.yaml
analysis_options.yaml
 
 
country_flag_shapes.png
country_flag_shapes.png
 
 
dart_test.yaml
dart_test.yaml
 
 
pubspec.yaml
pubspec.yaml
 
 

Repository files navigation

Country Flags

Pub GitHub Workflow Status (with branch) Pull Requests are welcome codecov Null safety

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

Showcase

country_flag_shapes

Installation

Simply add country_flags to your pubspec.yaml file.

dependencies:
  country_flags: ^3.0.0

Usage

Create a flag using a country code.

fromCountryCode supports 2 and 3 letter country code

CountryFlag.fromCountryCode('ES');

or

CountryFlag.fromCountryCode('ESP');

Create a flag from a language code

CountryFlag.fromLanguageCode('en');

Tweak the size of the flag

CountryFlag.fromLanguageCode(
  'en',
  width: 120,
  height: 80,
);

Create a circular flag

CountryFlag.fromCountryCode(
  'ES',
  shape: const Circle(),
);

Create a rectangular flag with rounded corners

CountryFlag.fromCountryCode(
  'ES',
  shape: const RoundedRectangle(6),
);

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

About

Easy to use library that allows you to render SVG flags of countries and languages

pub.dev/packages/country_flags

Resources

Readme
License
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.