IDataStoreOwner

interface IDataStoreOwner

IDataStoreOwner. It holds DataStore and provides some expansion methods.

// Here is a example
object ThemeDs: IDataStoreOwner {
override val dataStore: DataStore<Preferences> =
ContextHelper.getAppContext().dataStore

val theme by boolean(false)
}

Since

0.5.6

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun boolean(defaultValue: Boolean?): PreferenceProperty<Boolean>
Link copied to clipboard
open fun double(defaultValue: Double?): PreferenceProperty<Double>
Link copied to clipboard
open fun float(defaultValue: Float?): PreferenceProperty<Float>
Link copied to clipboard
open fun int(defaultValue: Int?): PreferenceProperty<Int>
Link copied to clipboard
open fun long(defaultValue: Long?): PreferenceProperty<Long>
Link copied to clipboard
open fun string(defaultValue: String?): PreferenceProperty<String>
Link copied to clipboard
open fun stringSet(defaultValue: Set<*>?): PreferenceProperty<Set<String>>