I'm trying to create TypeConverter for Color(androidx.compose.ui.graphics) class but room fails at coompile time with error
error: Class is referenced as a converter but it does not have any converter methods.
public final class ColorConverter {
^
Color class (in compose)
value class Color(val value: ULong) {
...
}
ColorConverter implementation
object ColorConverter {
@JvmStatic
@TypeConverter
fun toLong(color: Color): Long = color.value.toLong()
@JvmStatic
@TypeConverter
fun toColor(value: Long): Color = Color(value)
}
I've declared in DB as well
@TypeConverters(ColorConverter::class)