I'm trying to get a named String of a koin module ...
# koin
p
I'm trying to get a named String of a koin module on a class like this::
Copy code
val appModule = module {
    single(named(Qualifier.LIST_URL)) {"<https://www.myurl.com>"}
Copy code
suspend fun getBusStops() {
    get<String>(named(Qualifier.LIST_URL))
}
It is giving me this error:
Too many arguments for public open fun get(): Koin defined in org. koin. core. context. GlobalContext
1
a
are you using the right
get()
function from Koin instance?
p
Copy code
import org.koin.core.context.GlobalContext.get
I'm using that import Arnaud
is it the correct import? I tryed with
import org.koin.java.KoinJavaComponent.get
also, with another error:
Type mismatch. Required: Class<*> Found: Qualifier
there are not more imports available of Koin
I don't know what more to do and can't find any info in the Koin documentation
fell finally I found that it was necessary to implement KoinComponent interface for using get function outside a composable
that was the issue
a
ha yeah 💪