Is it possible to parametereize a ViewModel inject...
# koin
a
Is it possible to parametereize a ViewModel injecting the dependencies via the constructor, but also accepting an additional parameter to be passed from the activity/fragment. At the moment I have as setter on the viewmodel to pass the item id, but as this is not optional it should rather be in the constructor params. If this is possible is there an example somewhere for me to look at?
Copy code
class MyViewModel(private val repo: MyRepo, private val itemId) : ViewModel()