koin-android-scope / org.koin.android.scope.ext.android / android.arch.lifecycle.LifecycleOwner

Extensions for android.arch.lifecycle.LifecycleOwner

bindScope

fun LifecycleOwner.bindScope(scope: Scope, event: Event = Lifecycle.Event.ON_DESTROY): Unit

Set a Scope Observer onto the actual LifecycleOwner component will close the bound scopes on lifecycle event

createScope

fun LifecycleOwner.createScope(id: String): Scope

Create Scope

getOrCreateScope

fun LifecycleOwner.getOrCreateScope(id: String): Scope

Get or create Scope

getScope

fun LifecycleOwner.getScope(id: String): Scope

Get Scope