getNavViewModel

@Composable
inline fun <T : ViewModel> getNavViewModel(qualifier: Qualifier? = null, noinline state: BundleDefinition = emptyState(), noinline parameters: ParametersDefinition? = null): T

Gets ViewModel from Koin using root NavBackStackEntry as ViewModelStoreOwner. Needs to be called inside KoinNav or KoinNavHost.

Parameters

T

ViewModel type

qualifier

Koin's Qualifier

state

Initial BundleDefinition for ViewModels that uses SavedStateHandle

parameters

Koin's ParametersDefinition