I'm trying to display icon and text in jetpack compose desktop. However, icon is not appearing in the output window. Following is the code
@Composable
fun FileTreeItem(fileDetail: Path) {
Row( modifier = Modifier.padding(5.dp) ) {
Icon(imageVector = vectorXmlResource("images/folder-black-18dp.svg"),
modifier = Modifier.width(18.dp))
Text(fileDetail.toString())
}
}
Solved. The API needs vector XML. Online SVG to XML converters can be used.