Is there a way to inject an object inside an extension function or a global function using DI framework in Android Kotlin?
I use this function in many places. So I do not want to pass a parameter every time.
DI framework can be any of Koin, Hilt, Dagger2, or others.
Something like that:
fun Context.showSomething() {
val myObject = inject()
showToast(myObject.text)
}