How to inject dependency in composable using dagger hilt
Maybe I'm blind but I can't find anything about injecting a dependency that needs parameters in side a composable using dagger hilt.
Lets say my ViewModel looks something like this:
class MyViewModel @AssistedInject constructor(@Assisted myValue: Int) : ViewModel() {
...
}
and I've got a factory interface like this:
@AssistedFactory
interface MyViewModelAssistedFactory {
fun create(myValue: Int): MyViewModel
}
how can I inject that dependency with a certain value as parameter?
All...