Package-level declarations

Types

Link copied to clipboard

Implementing the State interface mutable state of Hikage.

Link copied to clipboard
interface NonNullState<T> : State<T>

Definition a Hikage runtime state interface for non-nullable type.

Link copied to clipboard
interface NullableState<T> : State<T?>

Definition a Hikage runtime state interface for nullable type.

Link copied to clipboard
interface State<T> : ReadWriteProperty<Any?, T>

Definition a Hikage runtime state interface.

Link copied to clipboard
fun interface StateObserver<in T>

Definition a Hikage runtime state observer.

Link copied to clipboard
fun interface StateSubscription

Definition a Hikage runtime state subscription.

Functions

Link copied to clipboard

Create a mutable state of Hikage with the specified value.

Link copied to clipboard
fun <T> mutableStateOfNull(value: T? = null): MutableState.Nullable<T>

Create a mutable state of Hikage with the specified value.

Link copied to clipboard
inline fun <T, R : View> R.setState(state: NonNullState<T>, crossinline apply: R.(T) -> Unit): StateSubscription
inline fun <T, R : View> R.setState(state: NullableState<T>, crossinline apply: R.(T?) -> Unit): StateSubscription
inline fun <T, R> R.setState(state: NonNullState<T>, crossinline apply: R.(T) -> Unit): StateSubscription
inline fun <T, R> R.setState(state: NullableState<T>, crossinline apply: R.(T?) -> Unit): StateSubscription

Set the Hikage state value.