encode

inline fun <T> Preferences.encode(tag: String, value: T)

Serializes and encodes the given value into the SharedPreferences at the specified tag using serializer retrieved from the reified type parameter.

Parameters

tag

key to encode data to

value

value to encode