koin-android / org.koin.androidx.scope / ScopeFragment

ScopeFragment

abstract class ScopeFragment : Fragment, AndroidScopeComponent

ScopeFragment

Fragment, allow to create & destroy tied Koin scope

Author
Arnaud Giuliani

Constructors

<init>

ScopeFragment

ScopeFragment(contentLayoutId: Int = 0, initialiseScope: Boolean = true)

Properties

scope

open val scope: Scope

Functions

onViewCreated

open fun onViewCreated(view: View, savedInstanceState: Bundle?): Unit

Extension Functions

getOrCreateScope

fun <T : ComponentCallbacks> T.getOrCreateScope(): Lazy<Scope>

newScope

fun <T : ComponentCallbacks> T.newScope(): Lazy<Scope>