Converter

fun interface Converter(source)

Converts vector graphic content into Kotlin Compose ImageVector code.

This class orchestrates the conversion process from raw vector file content (SVG or AVG) to Kotlin code that can be used in Compose applications. The conversion process consists of multiple steps: optional optimization, parsing the vector content into a domain model, and generating the corresponding Kotlin code.

The conversion process is exposed as a Flow that emits ConversionStep instances, allowing consumers to track progress and handle intermediate states such as optimization, parsing, code generation, completion, or errors.

Inheritors

Functions

Link copied to clipboard
abstract fun convert(content: String, iconName: String, config: ParserConfig, fileType: FileType, optimizer: ContentOptimizer?): Flow<ConversionStep>

Converts vector icon content into Kotlin Compose code by processing it through optimization, parsing, and code generation stages.