Hi, how do I inject a value into a property that's...
# koin
a
Hi, how do I inject a value into a property that's part of a POJO/POKO or otherwise in a class that does not inherit from ComponentCallbacks (as required by org.koin.android.ext.android.inject)? I have a class that requires a parameter-less constructor and does not implement ComponentCallbacks. It's part of an Android app (17+) written in Kotlin(1.2.41) using Koin (0.9.2). I want to inject my repo into this [non-conforming] class.
a
Hello @andre.artus you can use the
KoinComponent
interface and then use
by inject()
as you were in an activity
👍 1
a
Thank you very much, I'll try it.