Skip to content
pubscout

country_flags

4.1.2, released 10 months ago by fluttered.io

Displays country flags as SVG or emoji using ISO country, language, currency, or phone prefix codes

$ flutter pub add country_flags
Source repository

What it does

CountryFlag widgets render flag images or emoji for a given country code, language code, currency code, or phone prefix. The package supports custom sizing, shapes, and themes, and uses jovial_svg for efficient SVG rendering.

AI-written summary of version 4.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to show a country flag in a Flutter UI
  • You want to support multiple flag representations (SVG, emoji)
  • You need quick flag lookup by country, language, currency, or phone prefix

Skip it when

  • You require highly customized flag graphics beyond the provided shapes
  • You need flags that change dynamically based on user input beyond static codes

Strengths

  • Simple API with multiple lookup methods
  • Supports both SVG and emoji styles
  • Customizable size, shape, and theme

Weaknesses

  • Limited to flag display only
  • No support for dynamic flag updates or custom graphics
  • Relies on external SVG assets

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
CountryFlag.fromCountryCode('ES', theme: const ImageTheme(shape: Circle()));

Alternatives

Packages that do the same job and could replace country_flags.

  • app_badge_plus

    Flutter plugin to set numeric badges on app icons for iOS, Android, and macOS

  • circle_flags

    Provides a CircleFlag widget to display circular country flag SVGs.

  • world_flags

    Collection of more than 250 vector-based world flags rendered as widgets without assets.

  • re_editor

    A lightweight text and code editor widget for Flutter with syntax highlighting and folding.

Works with

Packages commonly used together with country_flags: ones it builds on, ones built on it, and its own family.