Kotpref icon indicating copy to clipboard operation
Kotpref copied to clipboard

Featur Request -> Save data class

Open zihadrizkyef opened this issue 2 years ago • 1 comments

Your library is so cool. Really easy to use Also it would be greater if you add feature to save data class in your KotPrefModel You can use GSON to convert data class to string and save it in shared pref

Thank you in advance

zihadrizkyef avatar Jun 20 '22 09:06 zihadrizkyef

You can use gson-support module.

https://github.com/chibatching/Kotpref/blob/e38e5318aaccf60a622838c64e0992bf47060cbc/sample/src/main/kotlin/com/chibatching/kotprefsample/UserInfo.kt#L26 https://github.com/chibatching/Kotpref/blob/e38e5318aaccf60a622838c64e0992bf47060cbc/sample/src/main/kotlin/com/chibatching/kotprefsample/Avatar.kt#L6-L12

chibatching avatar Jun 20 '22 15:06 chibatching