iex
05/02/2020, 5:24 PMT
here to not having to pass clazz
? With reified parameter or something?
fun <T> getObject(key: PreferencesKey, clazz: Class<T>): T? =
getString(key)?.let {
gson.fromJson(it, clazz)
}
Tolriq
05/02/2020, 5:26 PMiex
05/02/2020, 5:50 PMiex
05/02/2020, 5:51 PM