It’s possible in some cases, but daggerInject() wi...
# dagger
g
It’s possible in some cases, but daggerInject() will work in different way, you need access to some Injector class that provides component and looking for dependency and inject it, so it’s not the best option, also would require reflection to work or do that manully, something like:
val someObject: Foo by inject { foo() }
and inside inject you have your component context We tried all these option, but it’s hard to work with scopes and those solution smells, so we just use
lateinit
now I would recommend to use constructor injection if it’s possible
👍 1