get
Type-safe inline convenience for get using reified type T.
Return
Parameters
key
The key to read.
default
The value to return when the key does not exist or the buffer is empty.
Type-safe inline convenience for get using reified type T.
Return
The decoded value as T, or null when absent.
Parameters
key
The key to read.
Reads a value from MMKV and decodes it as the given Kotlin class clazz.
Supported types: Int, Long, Float, Double, Boolean, String, List
Return
Parameters
key
The key to read.
clazz
The expected Kotlin class of the value.
default
The value to return when the key does not exist or the buffer is empty.
Throws
if the stored buffer tag doesn't match clazz or type unsupported.