ScopeViewModel

abstract class ScopeViewModel : ViewModel, KoinScopeComponent

Deprecated

ScopeViewModel has been moved to org.koin.viewmodel.scope.ScopeViewModel (koin-core-viewmodel)

Replace with

import org.koin.viewmodel.scope
ScopeViewModel()

Class to help support Koin Scope in a ViewModel create directly a scope instance for current ViewModel

allow to intercept before scope closing with onCloseScope, to be overriden

Destroy linked scope with onCleared

Author

Arnaud Giuliani

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val scope: Scope

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
Link copied to clipboard
open fun getKoin(): Koin
Link copied to clipboard
open fun onCloseScope()

To override to add behavior before closing Scope