AbstractSetting

abstract class AbstractSetting<T>(preference: SharedPreferences, default: T)

An abstraction of a setting that is both observable and stateful

Parameters

preference

Shared preference that will be used for persistence

default

Default value to return

Inheritors

Constructors

Link copied to clipboard
constructor(preference: SharedPreferences, default: T)

Properties

Link copied to clipboard
abstract val flow: Flow<T>

Readonly observable to listen for changes for the setting

Link copied to clipboard
abstract var value: T

Allow you to set a value for the setting or access a snapshot value of the setting