kmp-flagkit icon indicating copy to clipboard operation
kmp-flagkit copied to clipboard

Flag icons in ImageVector format for Kotlin Multiplatform

kmp-flagkit

GitHub Workflow Status (with event) Maven Central Kotlin version License: MIT badge badge badge badge badge

Flag icons in ImageVector format to use in Kotlin Multiplatform.

With heavy inspiration from the FlagKit and flagkit-android libraries.

Platform Support

  • Android
  • Desktop
  • iOS
  • MacOS Native
  • Web (JSCanvas)

To use in your project

Add the repository:

repositories {
    mavenCentral()
}

Put in your dependencies block:

implementation("dev.carlsen.flagkit:flagkit:1.0.0")

How to use

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
Icon(
    imageVector = FlagIcons.DK,
    contentDescription = "Denmark",
)