ModulePreferences

Object used to access the module preferences defined in HeadConfig.settingsPage

Functions

Link copied to clipboard
suspend fun <T> getPreference(key: String, default: T): T

Get preference value by key or default suspending coroutine

Link copied to clipboard
fun <T> getPreferenceBlocking(key: String, default: T): T

Get preference value by key or default blocking the thread

Link copied to clipboard
suspend fun <T> getPreferenceOrNull(key: String): T?

Get preference value by key or null suspending coroutine

Link copied to clipboard

Get preference value by key or null blocking the thread

Link copied to clipboard
suspend fun <T> getPreferenceOrThrow(key: String): T

Get preference value by key or throw suspending coroutine

Link copied to clipboard

Get preference value by key or throw blocking the thread

Link copied to clipboard
suspend fun <T> setPreference(key: String, value: T?)

Set preference value by key suspending coroutine

Link copied to clipboard
fun <T> setPreferenceBlocking(key: String, value: T?)

Set preference value by key blocking the thread