koin-android-viewmodel / org.koin.android.viewmodel.ext.android / org.koin.core.scope.Scope

Extensions for org.koin.core.scope.Scope

getViewModel

fun <T : ViewModel> Scope.getViewModel(owner: LifecycleOwner, qualifier: Qualifier? = null, parameters: ParametersDefinition? = null): T

Get a viewModel instance

fun <T : ViewModel> Scope.getViewModel(owner: LifecycleOwner, clazz: KClass<T>, qualifier: Qualifier? = null, parameters: ParametersDefinition? = null): T

Lazy getByClass a viewModel instance

viewModel

fun <T : ViewModel> Scope.viewModel(owner: LifecycleOwner, clazz: KClass<T>, qualifier: Qualifier? = null, parameters: ParametersDefinition? = null): Lazy<T>

Lazy get a viewModel instance

fun <T : ViewModel> Scope.viewModel(owner: LifecycleOwner, qualifier: Qualifier? = null, parameters: ParametersDefinition? = null): Lazy<T>

Lazy getByClass a viewModel instance