ContributesViewModel
annotation class ContributesViewModel
Annotate a ViewModel class with this to automatically contribute it to the ViewModel scope multibinding. Equivalent to the following declaration in an application module:
@Provides
@IntoMap
@ViewModelKey(MainViewModel::class)
public fun providesMainViewModel(
<arguments>
): ViewModelFactory = ViewModelFactory {
MainViewModel(
<arguments>
)
}
Content copied to clipboard
The generated code created via the anvil-codegen module.