ViewModelGraph

Extension of MetroViewModelMultibindings that also includes a MetroViewModelFactory accessor. Extend this in a dependency graph that needs to expose MetroViewModelFactory.

@DependencyGraph
interface MyGraph : ViewModelGraph

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

The factory that creates this graph's ViewModels and assisted factories.

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

Constructor-injected ViewModel providers keyed by their ViewModel class.