Package-level declarations

Types

Link copied to clipboard

Functions

Link copied to clipboard
fun <STATE : Parcelable, SIDE_EFFECT : Any> ViewModel.container(initialState: STATE, savedStateHandle: SavedStateHandle, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>

Creates a container scoped with ViewModelScope with Android ViewModel's saved state support for Parcelable state.

Creates a container scoped with ViewModelScope with external state transformation and Android ViewModel's saved state support for Parcelable state.

fun <STATE : Any, SIDE_EFFECT : Any> ViewModel.container(initialState: STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>

Creates a container scoped with ViewModelScope.

Creates a container scoped with ViewModelScope with external state transformation.

fun <STATE : Any, SIDE_EFFECT : Any> ViewModel.container(initialState: STATE, savedStateHandle: SavedStateHandle, serializer: KSerializer<STATE>, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>

Creates a container scoped with ViewModelScope with saved state support.

fun <INTERNAL_STATE : Any, EXTERNAL_STATE : Any, SIDE_EFFECT : Any> ViewModel.container(initialState: INTERNAL_STATE, savedStateHandle: SavedStateHandle, serializer: KSerializer<INTERNAL_STATE>, transformState: (INTERNAL_STATE) -> EXTERNAL_STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<INTERNAL_STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<INTERNAL_STATE, EXTERNAL_STATE, SIDE_EFFECT>

Creates a container scoped with ViewModelScope with external state transformation and saved state support.

Link copied to clipboard
fun <INTERNAL_STATE : Any, EXTERNAL_STATE : Any, SIDE_EFFECT : Any> OrbitContainerHost<INTERNAL_STATE, EXTERNAL_STATE, SIDE_EFFECT>.observe(lifecycleOwner: LifecycleOwner, lifecycleState: Lifecycle.State = Lifecycle.State.STARTED, state: suspend (state: EXTERNAL_STATE) -> Unit? = null, sideEffect: suspend (sideEffect: SIDE_EFFECT) -> Unit? = null)

Observe OrbitContainer.externalStateFlow and OrbitContainer.sideEffectFlow correctly on Android in one-line of code. These streams are observed when the view is in Lifecycle.State.STARTED.

Link copied to clipboard
fun <STATE : Parcelable, SIDE_EFFECT : Any> ViewModel.orbitContainer(initialState: STATE, savedStateHandle: SavedStateHandle, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>

Creates a container scoped with ViewModelScope with Android ViewModel's saved state support for Parcelable state.

Creates a container scoped with ViewModelScope with external state transformation and Android ViewModel's saved state support for Parcelable state.

fun <STATE : Any, SIDE_EFFECT : Any> ViewModel.orbitContainer(initialState: STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>

Creates a container scoped with ViewModelScope.

Creates a container scoped with ViewModelScope with external state transformation.

fun <STATE : Any, SIDE_EFFECT : Any> ViewModel.orbitContainer(initialState: STATE, savedStateHandle: SavedStateHandle, serializer: KSerializer<STATE>, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>

Creates a container scoped with ViewModelScope with saved state support.

fun <INTERNAL_STATE : Any, EXTERNAL_STATE : Any, SIDE_EFFECT : Any> ViewModel.orbitContainer(initialState: INTERNAL_STATE, savedStateHandle: SavedStateHandle, serializer: KSerializer<INTERNAL_STATE>, transformState: (INTERNAL_STATE) -> EXTERNAL_STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<INTERNAL_STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<INTERNAL_STATE, EXTERNAL_STATE, SIDE_EFFECT>

Creates a container scoped with ViewModelScope with external state transformation and saved state support.