Hey guyz, I am using koin in my Kotlin Multiplatfo...
# koin
k
Hey guyz, I am using koin in my Kotlin Multiplatform project. Now there is an android extension function
getKoin().get()
that I am able to access at my app level, but I am not able to access it in androidMain of my shared module, I am only able to access the compose variation of this function. Even though all of the dependencies are added in the shared module gradle.
a
Do you want to resolve an instance directly?
k
@arnaud.giuliani yep.... In a function.
a
you need to get Koin from somewhere then. From default context you can do
KoinPlatform.getKoin()
k
I was able to do it by moving it into a class that implements
KoinComponent
Thanks for you help.
👍 1