container

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>(source)

Deprecated

Use orbitContainer instead

Replace with

orbitContainer(initialState, savedStateHandle, buildSettings, onCreate)

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


Deprecated

Use orbitContainer instead

Replace with

orbitContainer(initialState, savedStateHandle, transformState, buildSettings, onCreate)

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>(source)

Deprecated

Use orbitContainer instead

Replace with

orbitContainer(initialState, buildSettings, onCreate)

Creates a container scoped with ViewModelScope.


Deprecated

Use orbitContainer instead

Replace with

orbitContainer(initialState, transformState, buildSettings, onCreate)

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>(source)

Deprecated

Use orbitContainer instead

Replace with

orbitContainer(initialState, savedStateHandle, serializer, buildSettings, onCreate)

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>(source)

Deprecated

Use orbitContainer instead

Replace with

orbitContainer(initialState, savedStateHandle, serializer, transformState, buildSettings, onCreate)

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