koin-android-viewmodel / org.koin.android.viewmodel.ext.android / android.support.v4.app.Fragment / getSharedViewModel

getSharedViewModel

inline fun <reified T : ViewModel> Fragment.getSharedViewModel(qualifier: Qualifier? = null, noinline from: ViewModelStoreOwnerDefinition = { activity as ViewModelStoreOwner }, noinline parameters: ParametersDefinition? = null): T

Get a shared viewModel instance from underlying Activity

Parameters

qualifier -

from -

parameters -

fun <T : ViewModel> Fragment.getSharedViewModel(clazz: KClass<T>, qualifier: Qualifier? = null, from: ViewModelStoreOwnerDefinition = { activity as ViewModelStoreOwner }, parameters: ParametersDefinition? = null): T

Get a shared viewModel instance from underlying Activity

Parameters

qualifier -

from -

parameters -

clazz -