Hi everyone. There's a something that i really, re...
# koin
e
Hi everyone. There's a something that i really, really want to work, but i can't figure out a way to get it right. Details in thread
I have a common package where i define some MVI base classes. one of which is a
Screen
class, which has an abstract
@Composable Content()
method that is the entrypoint for that screen's ui. In order to reduce boilerplate, i have this
content
function in my Screen class: (edit: moved it to a snippet) it's meant to be used in a
Screen
implementation's
Content()
implementation like this: (edit: moved to snippet) my current issue is that the koinViewModel call will resolve to, using the above as an example, CarthasViewModel, which is my abstract vm class. This causes koin not to be able to find the vm class since the definition is of a CreateEventViewModel type. what's the best way to get around this without explicitly doing
content<CreateEventViewModel, CreateEventState, CreateEventIntent> { }
? again the purpose is to reduce boilerplate, so i'd really like to avoid having to specify all of the type params every time
Content impl example.kt
content convenience function impl.kt
looks like partially inferred type params might be my best bet
content<_,_,CreateEventViewModel> { }