I used ViewModelProvider(this).get(myDataIdentifier, MyViewModel::class.java)
to get the same viewmodel for each identifier.
Now I want to use Koin for dependency injection but I can't figure out how to get this working.
I can inject data via val viewModel by viewModel()
but where am I able to make sure to get the same instance, identified by myDataIdentifier
? I can't wrap my head around qualifier, parameter,....
Sorry, maybe this is a dumb question and i just overlooked something.
Try with named components, name your viewmodel (this may now need to be a singleton?)
https://engineering.bigshyft.com/koin-2-0-for-android/