NullableStringPrefDelegate

A ReadWriteProperty delegate that provides concise, type-safe access to SharedPreferences for nullable strings.

Parameters

prefs

The SharedPreferences instance to back the property.

key

The key used to store and retrieve the value.

defaultValue

The default value to return if no value is found.

Constructors

Link copied to clipboard
constructor(prefs: SharedPreferences, key: String, defaultValue: String?)

Functions

Link copied to clipboard
open operator override fun getValue(thisRef: Any?, property: KProperty<*>): String?
Link copied to clipboard
open operator override fun setValue(thisRef: Any?, property: KProperty<*>, value: String?)