Search packages, repositories and app categories

Package detailsv3.0.0

country_icons

A flutter package with many country flag icons that you can use via the Image.asset method

AndroidiOSmacOSWindowsLinux
30-day downloads
13.7K
Likes
103
Pub points
150

Install package

flutter pub add country_icons

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package providing a collection of country flag icons that can be easily integrated into apps using the Image.asset method. Designed for simplicity and efficiency, it supports multiple platforms including Android, iOS, macOS, Windows, and Linux. The icons are delivered as asset files, enabling fast rendering and minimal overhead. Ideal for applications requiring visual representation of countries, such as international user interfaces, travel apps, or language selection features.

Use cases

  • Displaying country flags in user profiles
  • Implementing language or region selection
  • Enhancing travel or localization features
  • Creating multilingual app interfaces
  • Showing origin in global data visualizations

Key features

  • Pre-built flag assets for numerous countries
  • Simple integration via Image.asset
  • Cross-platform compatibility
  • Lightweight and efficient
  • Easy to update with new flags

Suitable for

  • Apps with international user bases
  • Travel and tourism platforms
  • Language or region selector components
  • Global data dashboards
  • Multilingual UIs

Considerations

  • Requires manual asset management for custom flags
  • Limited to static icon set
  • No built-in animation or interactive features
  • Depends on correct asset path configuration
  • May require additional size optimization for large icon sets

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

country_icons

A dart package with many country flag icons

Getting Started

This package provides country icons as PNG and SVG to be used in dart code. You can simply access the files directly via an asset() method, or you can use the packages method getSvgFlag().

Icons as png

You can either use the PNG icons directly via new Image.asset('icons/flags/pngXXXXpx/yy.png', package: 'country_icons'); where XXXX is the size [100,250,1000] and yy is the country code.

Icons as SVG

Alternatively you can use SVG icons via new SvgPicture.asset('icons/flags/svg/xx.svg', package: 'country_icons'); For this to work you should require flutter_svg in your code directly.

dependencies:
flutter_svg: ^2.0.0
Packages Method for SVGs

You can use CountryIcons.getSvgFlag('de') for use in your code, if you do a

import 'package:country_icons/country_icons.dart';

Requests for new/updates flags

This package is simply a wrapper for the excellent flag collection of hjnilsson (see Credits below). Any requests for adding, updating or removing of flags do not make sense in this repo.

Credits

Flags are used from hjnilsson

Repo: https://github.com/hjnilsson/country-flags Homepage: http://hjnilsson.github.io/country-flags

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.