MetroViewModelMultibindings

Contains common multibindings for standard ViewModels and assisted ViewModels.

Extend this in a dependency graph that needs to only needs to expose viewmodel provider map multibindings. If you want MetroViewModelFactory access, extend ViewModelGraph instead.

@DependencyGraph
interface MyGraph : MetroViewModelMultibindings

Inheritors

Properties

Link copied to clipboard
@Multibinds(allowEmpty = true)
abstract val assistedFactoryProviders: Map<KClass<out ViewModel>, () -> ViewModelAssistedFactory>

Assisted factory providers keyed by the ViewModel class they create.

Link copied to clipboard

Manually assisted factory providers keyed by their factory class.

Link copied to clipboard
@Multibinds(allowEmpty = true)
abstract val viewModelProviders: Map<KClass<out ViewModel>, () -> ViewModel>

Constructor-injected ViewModel providers keyed by their ViewModel class.