toggle menu
JchuComponents
androidJvm
switch theme
search in API
jchucomponents-prefs
/
com.jeluchu.prefs.datastore
/
DataStoreHelpers
Data
Store
Helpers
class
DataStoreHelpers
Members
Constructors
Data
Store
Helpers
Link copied to clipboard
constructor
(
)
Types
Companion
Link copied to clipboard
object
Companion
Functions
get
Preference
Link copied to clipboard
fun
<
T
>
getPreference
(
key
:
Preferences.Key
<
T
>
)
:
T
?
fun
getPreference
(
key
:
Preferences.Key
<
Boolean
>
,
default
:
Boolean
=
false
)
:
Boolean
fun
getPreference
(
key
:
Preferences.Key
<
Float
>
,
default
:
Float
=
Float.empty()
)
:
Float
fun
getPreference
(
key
:
Preferences.Key
<
Int
>
,
default
:
Int
=
Int.empty()
)
:
Int
fun
getPreference
(
key
:
Preferences.Key
<
Long
>
,
default
:
Long
=
Long.empty()
)
:
Long
fun
getPreference
(
key
:
Preferences.Key
<
String
>
,
default
:
String
=
String.empty()
)
:
String
save
Preference
Link copied to clipboard
fun
<
T
>
savePreference
(
key
:
Preferences.Key
<
T
>
,
value
:
T
)
fun
savePreference
(
key
:
Preferences.Key
<
Boolean
>
,
value
:
Boolean
)
fun
savePreference
(
key
:
Preferences.Key
<
Float
>
,
value
:
Float
)
fun
savePreference
(
key
:
Preferences.Key
<
Int
>
,
value
:
Int
)
fun
savePreference
(
key
:
Preferences.Key
<
Long
>
,
value
:
Long
)
fun
savePreference
(
key
:
Preferences.Key
<
String
>
,
value
:
String
)