PreferencesModule

The module for modifying preferences.

Author

Arnau Mora

Since

20211229

Functions

Link copied to clipboard
suspend fun clear(context: Context)

Clears all the preferences from the system.

Link copied to clipboard
suspend fun <T> get(context: Context, key: Preferences.Key<T>, default: T): T

Gets the last value stored at key, or returns default if there are no stored values.

Link copied to clipboard
suspend fun <T> set(context: Context, key: Preferences.Key<T>, value: T)

Updates the value at key with value.