https://github.com/lunagao/flag_flutter
flag icons
https://github.com/lunagao/flag_flutter
flag flags flutter-plugin
Last synced: 11 months ago
JSON representation
flag icons
- Host: GitHub
- URL: https://github.com/lunagao/flag_flutter
- Owner: LunaGao
- License: bsd-2-clause
- Created: 2019-08-05T08:34:55.000Z (over 6 years ago)
- Default Branch: stable
- Last Pushed: 2024-04-15T12:00:39.000Z (almost 2 years ago)
- Last Synced: 2025-04-09T22:18:25.791Z (11 months ago)
- Topics: flag, flags, flutter-plugin
- Language: Dart
- Homepage: https://pub.dev/packages/flag
- Size: 3.79 MB
- Stars: 64
- Watchers: 2
- Forks: 59
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

# flag
[](https://pub.dev/packages/flag)
[](https://lunagao.github.io/BlessYourCodeTag/)
A flag Flutter package for `Android` / `iOS` / `Web`. Based by https://github.com/dnfield/flutter_svg .
## Screenshot

## Svg sources
* All flags came from https://github.com/lipis/flag-icons/releases/tag/v4.1.4
Thanks the great project [flag-icons](https://github.com/lipis/flag-icons).
## Flag list
ISO 3166-1-alpha-2 Flags
Note:
Organisations
* `eu` European Union.
Disputed territories
* `hk` Hong Kong. Special Administrative Region of China.
* `mo` Macau. Special Administrative Region of China.
* `eh` Western Sahara. Claimed by Morocco.
* `tw` Taiwan. Claimed by China.
Undisputed territories which are non-UN state
* `va` Vatican City. Govern by the Holy See.
## How to use
```
Flag.fromCode(
FlagsCode.COUNTRY_CODE,
height: HEIGHT,
width: WIDTH,
)
```
```
Flag.fromString(
COUNTRY_CODE,
height: HEIGHT,
width: WIDTH,
)
```
```
Flags.fromCode(
[
FlagsCode.GB,
FlagsCode.US
],
height: 100,
width: 100 * 4 / 3,
)
```
Such as
* `Flag.fromCode(FlagsCode.AD, height: 100, width: null)`
* `Flag.fromString('AD', height: null, width: null)`
* `Flag.fromString('AD', height: 10, width: 100, fit: BoxFit.fill)`