Flag icons in ImageVector format to use in Kotlin Multiplatform.
With heavy inspiration from the FlagKit and flagkit-android libraries.
- Android
- Desktop
- iOS
- MacOS Native
- Web (JSCanvas)
- WebAssembly (Wasm)
Add the repository:
repositories {
mavenCentral()
}Put in your dependencies block:
implementation("dev.carlsen.flagkit:flagkit:1.1.0")Country flags can be referenced by the Alpha-2 code for each country.
There are also a few other flags available.
| Country/state | Code |
|---|---|
| England | GB-ENG |
| Northern Ireland | GB-NIR |
| Scotland | GB-SCT |
| Wales | GB-WLS |
| Shetland | GB-ZET |
| California | US-CA |
Image(
imageVector = FlagIcons.DK,
contentDescription = "Denmark",
)Image(
imageVector = FlagKit.getFlag(countryCode = "DK"),
contentDescription = "Denmark",
)