How to handle a scope across multiple koin modules...
# koin
l
How to handle a scope across multiple koin modules or even gradle modules? Example: I have a screen that utilizes bluetooth api to scan for devices. When connected with a device the user is redirected to a dashboard screen where I want to create a
scope(named("CONNECTED")) {  }
. Every definition should live in this scope. But the definitions are spread across multiple gradle modules. Any guidelines for this kind of use case?
c
I had a similar situation but it was not about scopes. Rather, is was just about injecting a named dependency. I ended up creating an interface in a shared module and using that.
Copy code
interface ConnectedNamedQualifier
named<ConnectedNamedQualifier>(){}
👍 1
a
good one