Twemoji Flags

Package Publisher MIT License

twemoji_flags is a collection of emoji flags based on jdecked's fork of Twemoji icons. This package contains country flags only (to save space), and each flag is compiled into a vector graphic based on the SVG files provided in the original repository (to increase performance).

If a particular country code is not supported, then the United Nations flag is used as a fallback.

To implement a custom behavior, check TwemojiFlag.isSupported(countryCode).

Getting started

  1. Add this package to your dependencies.
dependencies:
  twemoji_flags: latest_version
  1. Get the dependencies.
flutter pub get
  1. Use TwemojiFlag with a country code.
return TwemojiFlag(
  // Lowercase country code.
  countryCode: 'us',
  width: 64,
  height: 64,
);

Additional information

  • This package requires at least Flutter 3.32.0 to work.
  • If there are any issues feel free to go to GitHub Issues and report a bug.

Maintainers

Libraries

twemoji_flags