Package-level declarations

Types

Link copied to clipboard

Atom is a unit of state in Space.

Link copied to clipboard

AtomRef holds a value derived from one or more Atom references as a block function.

Link copied to clipboard
interface AtomSaver<T>

Interface for saving and restoring values to a Bundle.

Link copied to clipboard
typealias AtomSaverKey = String
Link copied to clipboard
class AtomScope

Provides a scope for creating Atoms that manage state in different AtomStores.

Link copied to clipboard
interface AtomSelector

Interface for retrieving the value associated with the Atoms reference key.

Link copied to clipboard

An interface for storing and retrieving atoms.

Functions

Link copied to clipboard
@JvmName(name = "atomWithParcelable")
inline fun <T : Parcelable> atom(initialValue: T, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<T>

Creates an Atom using AtomSaverKey for Parcelable.

@JvmName(name = "atomWithSerializable")
inline fun <T : Serializable> atom(initialValue: T, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<T>

Creates an Atom using AtomSaverKey for Serializable.

@JvmName(name = "atomWithParcelableArrayList")
inline fun <T : Parcelable> atom(initialValue: ArrayList<T>, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<ArrayList<T>>

Creates an Atom using AtomSaverKey for ArrayList with Parcelable.

@JvmName(name = "atomWithParcelableArray")
inline fun <T : Parcelable> atom(initialValue: Array<T>, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<Array<T>>

Creates an Atom using AtomSaverKey for Array with Parcelable.

fun <T> atom(block: AtomSelector.() -> T): AtomRef<T>

Creates an AtomRef with the specified block function.

inline fun <T> atom(initialValue: T, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<T>

Creates an Atom using AtomSaverKey.

fun <T> atom(initialValue: T, saver: AtomSaver<T>? = null, scope: AtomScope? = null): Atom<T>

Creates an Atom.

@JvmName(name = "atomWithBundle")
inline fun atom(initialValue: Bundle, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<Bundle>
@JvmName(name = "atomWithArray")
inline fun <T> atom(initialValue: Array<T>, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<Array<T>>
@JvmName(name = "atomWithBooleanArray")
inline fun atom(initialValue: BooleanArray, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<BooleanArray>
@JvmName(name = "atomWithByteArray")
inline fun atom(initialValue: ByteArray, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<ByteArray>
@JvmName(name = "atomWithCharArray")
inline fun atom(initialValue: CharArray, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<CharArray>
@JvmName(name = "atomWithDoubleArray")
inline fun atom(initialValue: DoubleArray, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<DoubleArray>
@JvmName(name = "atomWithFloatArray")
inline fun atom(initialValue: FloatArray, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<FloatArray>
@JvmName(name = "atomWithIntArray")
inline fun atom(initialValue: IntArray, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<IntArray>
@JvmName(name = "atomWithLongArray")
inline fun atom(initialValue: LongArray, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<LongArray>
@JvmName(name = "atomWithShortArray")
inline fun atom(initialValue: ShortArray, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<ShortArray>

@JvmName(name = "atomWithArrayList")
inline fun <T> atom(initialValue: ArrayList<T>, saverKey: AtomSaverKey, scope: AtomScope? = null): Atom<ArrayList<T>>

Creates an Atom using AtomSaverKey for ArrayList.

Link copied to clipboard

Creates an AtomScope.

Link copied to clipboard
@ExperimentalSerializationApi
inline fun <T> serializationSaver(key: AtomSaverKey, serializer: KSerializer<T> = serializer(), bundler: Bundler = Bundler): AtomSaver<T>

Create an AtomSaver for Kotlin Serialization.