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

navargs.* cannot be imported in ArgsToSavedStateHandle.kt #631

Closed
SorrowBlue opened this issue May 6, 2024 · 2 comments
Closed

navargs.* cannot be imported in ArgsToSavedStateHandle.kt #631

SorrowBlue opened this issue May 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@SorrowBlue
Copy link

current version is 2.1.0-beta04.

navargs.* cannot be imported in ArgsToSavedStateHandle.kt.
I have a Destination in another module that does not define NavArgs.

image

I can solve it by creating a meaningless Destination, but it's not pretty.
For Example:

// :tutorial module
@Destination<ExternalModuleGraph>
@Composable
internal fun EmptyScreen(value: Int = 0) {
    Text(text = "$value")
}

I'm having a problem with the following code.

// :app module
@NavHostGraph
internal annotation class MainGraph {

    @ExternalNavGraph<BookshelfNavGraph>(start = true)
    @ExternalNavGraph<TutorialNavGraph>
    @ExternalDestination<FavoriteAddScreenDestination>
    companion object Includes
}
// :tutorial module
@NavGraph<ExternalModuleGraph>
internal annotation class TutorialGraph

@Destination<TutorialGraph>(start = true)
@Composable
internal fun TutorialScreen(navigator: TutorialScreenNavigator) {
TutorialScreen(onComplete = navigator::onComplete)
}
@raamcosta raamcosta added the bug Something isn't working label May 6, 2024
@raamcosta
Copy link
Owner

Fixed! Should be up later today.

Thank you once again for reporting 🙏

@raamcosta
Copy link
Owner

beta05 are building. should be up in 30min or so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants