Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inquiry about dependenciesContainerBuilder #695

Open
yoobi opened this issue Oct 24, 2024 · 0 comments
Open

Inquiry about dependenciesContainerBuilder #695

yoobi opened this issue Oct 24, 2024 · 0 comments

Comments

@yoobi
Copy link

yoobi commented Oct 24, 2024

Hi, just a quick question about dependenciesContainerBuilder

I've created a wrapper called Navigator which I set in my MainActivity with a DisposableEffect. Is it alright to pass such objet to dependenciesContainerBuilder ?

val composableNavigator = ComposableNavigator.rememberNavigator() // Creates navController, bottomSheetState etc...
DisposableEffect(key1 = composableNavigator) {
    navigator.setNavigation(composableNavigator.navController)
    onDispose {
        navigator.clearNavigation()
    }
}
ModalBottomSheetLayout(...) {
    DestinationsNavHost(
        dependenciesContainerBuilder = {
            dependency(navigator)
        },
        navController = navController,
        navGraph = NavGraphs.root,
        startRoute = startRoute
    )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant