Rodrigo Silva
01/03/2024, 3:42 PMRodrigo Silva
01/03/2024, 3:43 PMval moduleTest= module {
scope<SomeInterface> { SomeImplementation() }
}
and registered the module
install(Koin) {
slf4jLogger()
modules(moduleTest)
}
Now I wanted to use the class when calling the interface.
class SomeClass(impl: Interface) {
val useImpl = i got lost here.
}
But I don't know how to do that.
I tried
val impl= get<SomeInterface>()
but it did not work.LeoColman
01/03/2024, 4:03 PMsingle
instead of scope
. You're not using the scope for anything, that's why it's getting lostLeoColman
01/03/2024, 4:03 PMLeoColman
01/03/2024, 4:04 PM