kotlinandroid-jetpack-composecompose-desktop

Compose Desktop: How to Access Extended Material Icon Set?


I am making an app using Compose for Desktop. I am trying to include a simple file download Icon that I know is included in the lengthy set of Material Icons, however it is not available under Icons.Filled. Some of the icons included, in my opinion, are nowhere near as commonly used as download... go figure.

I know that Compose for Android has a dependency for an extended set of Material Icons. I tried adding that dependency to my Desktop app, but it threw errors at me.

For now I have added a Feather Icons set courtesy of DevSrSouza, but I would like to know if there is a way to access the Material Icons extension in Compose for Desktop? Thanks.


Solution

  • I guess you have already found the answer but I also had this problem for long time, so here is a right dependency for compose desktop: "org.jetbrains.compose.material:material-icons-extended-desktop:$compose_version"

    UPD: Here is a better solution. In build.gradle.kts you can access compose object with all compose desktop dependencies. In our case: implementation(compose.materialIconsExtended). I found this somewhere in official JetBrains github repository.