flag 5.0.1 flag: ^5.0.1 copied to clipboard
A flag Flutter package. Use for showing flags. All flags came from https://www.un.org/en/member-states/index.html .
A flag Flutter package for
Web. Mobile Based by https://github.com/dnfield/flutter_svg , Web Based by
Svg sources #
- Flag list came from UN members. UN Web Site
- A lot of flag svg files came from wikimedia, such as Antigua and Barbuda
- Some flag svg files came from Countryflags.
fetch data :python file is
Update time: 2020-04-21 23:22:58
Marge from 2.0.X to 3 #
Flag list #
euEuropean Union. Modify by art-decor for European Union
hkHong Kong. Special Administrative Region of China.
moMacau. Special Administrative Region of China.
ehWestern Sahara. Claimed by Morocco.
twTaiwan. Claimed by China.
Undisputed territories which are non-UN state
vaVatican 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),
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)
Web Error #
If you got an
ImageCodecException issue on web, maybe this issue can solve your problem.
brazilian(br) flag, you can see that the letters are still a bit abnormal.
Branch & version #
switch Flutter SDK channel Flutter-build-release-channels
flutter channel flutter channel <channel-name>
stable--> verison X.Y.Z (using latest
stablechannel Flutter SDK)
Channel stable, 2.0.0
master--> verison X.Y.Z-pre (using latest
batechannel Flutter SDK)
Channel beta, 1.20.0-7.3.pre