Google is committed to advancing racial equity for Black communities. See how.

HiltViewModelFactory

class HiltViewModelFactory : AbstractSavedStateViewModelFactory
androidx.lifecycle.AbstractSavedStateViewModelFactory
   ↳ androidx.hilt.lifecycle.HiltViewModelFactory

View Model Provider Factory for the Hilt Extension.

A provider for this factory will be installed in the dagger.hilt.android.components.ActivityComponent and dagger.hilt.android.components.FragmentComponent. An instance of this factory will also be the default factory by activities and fragments annotated with dagger.hilt.android.AndroidEntryPoint.

Summary

Protected methods
T
create(@NonNull key: String, @NonNull modelClass: Class<T>, @NonNull handle: SavedStateHandle)

Inherited functions

Protected methods

create

@NonNull protected fun <T : ViewModel!> create(
    @NonNull key: String,
    @NonNull modelClass: Class<T>,
    @NonNull handle: SavedStateHandle
): T