public class PreferoutinesExtrasKt
| Modifier and Type | Method and Description |
|---|---|
static kotlinx.coroutines.flow.Flow<java.lang.String> |
getNonNullStringFlow(android.content.SharedPreferences $receiver,
java.lang.String key,
java.lang.String defaultValue)
Continuously receive the string value associated with the given
key. Since defaultValue is not null, the emitted
value will never be null. |
static kotlinx.coroutines.flow.Flow<java.util.Set> |
getNonNullStringSetFlow(android.content.SharedPreferences $receiver,
java.lang.String key,
java.util.Set<java.lang.String> defaultValue)
Continuously receive a string set associated with the given
key. Since defaultValue is not null, the emitted set
will never be null. |
@ExperimentalCoroutinesApi
@NotNull
public static kotlinx.coroutines.flow.Flow<java.lang.String> getNonNullStringFlow(@NotNull
android.content.SharedPreferences $receiver,
@NotNull
java.lang.String key,
@NotNull
java.lang.String defaultValue)
Continuously receive the string value associated with the given key. Since defaultValue is not null, the emitted
value will never be null.
key. Emits the current value upon subscription, and emits the
new value each time it is updated. If the value is null or is later set to null or removed, the provided
defaultValue is emitted.ClassCastException - if there is a preference with this name that is not a String.key,
defaultValue@ExperimentalCoroutinesApi
@NotNull
public static kotlinx.coroutines.flow.Flow<java.util.Set> getNonNullStringSetFlow(@NotNull
android.content.SharedPreferences $receiver,
@NotNull
java.lang.String key,
@NotNull
java.util.Set<java.lang.String> defaultValue)
Continuously receive a string set associated with the given key. Since defaultValue is not null, the emitted set
will never be null.
key. Emits the current value upon subscription, and emits the
new value each time it is updated. If the value is null or is later set to null or removed, the provided
defaultValue is emitted.ClassCastException - if there is a preference with this name that is not a {@link Set}.key,
defaultValue