Package-level declarations

Types

Link copied to clipboard
class KodeinViewModelScopedFactory<A : Any>(di: DI, argType: TypeToken<A>, arg: A, tag: String? = null) : ViewModelProvider.Factory

Factory class for creating ViewModel instances using Kodein dependency injection.

Link copied to clipboard

Factory class used to create ViewModel instances with Kodein DI container

Functions

Link copied to clipboard

Composable function that remembers a ViewModel instance in a Composable tree using Kodein DI container. It returns ViewModelLazy, a property delegate that lazily accesses the ViewModel instance.

inline fun <A : Any, VM : ViewModel> rememberViewModel(tag: String? = null, arg: A): ViewModelLazy<VM>

Creates a ViewModel instance using Kodein dependency injection and remembers it for recomposition. The ViewModel will be scoped to the current scope defined by the ViewModelStoreOwner.