Skip to content

v1.1.5 released !

Choose a tag to compare

@FunnySaltyFish FunnySaltyFish released this 12 Mar 10:29
· 59 commits to master since this release
  • add support for sealed class
    • actually, this means that if you call registerTypeConverters<A>, then classes that extends from A will be supported automatically
sealed class ThemeType(val id: Int) {
    object StaticDefault: ThemeType(-1)
    object DynamicNative : ThemeType(0)
    class DynamicFromImage(val color: Color) : ThemeType(1)
    class StaticFromColor(val color: Color): ThemeType(2)
}

you can call

registerTypeConverters<ThemeType>(save = ThemeType.Saver, restore = ThemeType.Restorer)

to support converting it.

  • add a function getGenericType() to obtain the actual type of an Object