Repository navigation
|
I have a project that consists of "integrations" with other services. These integrations are discovered and loaded using a The interface looks like this: interface Integration: Screen {
val metadata: IntegrationMetadata
}Every integration has its own UI and uses its own Can I somehow configure the main I wanted to decouple the whole integrations from the main UI. But as it is now, I still need to hardcode the |
Replies: 1 comment
|
Yes. Since your fun openIntegration(
rootNavigator: Navigator,
integration: Integration,
) {
rootNavigator.push(integration)
}Call this from the integration picker using the root navigator. Voyager invokes the selected integration's The One Android consideration: objects on the stack still need to meet Voyager's state-restoration requirements. Avoid putting live service/client objects into an integration screen's saved properties; obtain those dependencies inside its composable content or ScreenModel. References: multi-module lookup, screen navigation, state restoration. |
Yes. Since your
Integrationalready extendsScreen, the object discovered byServiceLoadercan be pushed directly. ARootSharedScreenhierarchy is not required byNavigator:Call this from the integration picker using the root navigator. Voyager invokes the selected integration's
Content(); that content can create its own nestedNavigatorexactly as it does now.The
SharedScreen : ScreenProviderpattern in the multi-module guide is an optional lookup layer:ScreenRegistrymaps a provider to a concreteScreen, which is then passed topush. Your service discovery alread…