https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
r

robercoding

02/25/2023, 12:58 AM
Hey newbie question! I'm trying to load a local SVG file. I've copy pasted the svg to the resource folder of the project. Svg name is: "_import.sv_g" Then I'm calling it in the code like this
Copy code
Icon(painter = painterResource("import.svg"), contentDescription = null)
It throws me an error because file is not found. What am I doing wrong and what is the correct way to get this file path?
Solved bloodtrail
Copy code
Icon(painter = painterResource("/import.svg"), contentDescription = null)
a

Arjan van Wieringen

02/25/2023, 6:23 AM
🥳 devil is in the details
5 Views