raamcosta / compose-destinations

Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.
https://composedestinations.rafaelcosta.xyz
Apache License 2.0
3.14k stars 129 forks source link

Theme doesn't carry over to other destinations #620

Closed coffee-code97 closed 2 months ago

coffee-code97 commented 2 months ago

The only place theme applies is the initial screen where I set up the navigation with the

setContent {
    **MyProjectTheme** {
        Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
            DestinationsNavHost(navGraph = NavGraphs.root)
        }
    }
}

When I navigate to any other screen using e.g. destinationsNavigator.navigate(LoginScreenDestination) Theme doesn't apply anymore. This works properly using the default navigations-compose package though.

I'm using

id("com.google.devtools.ksp") version "1.9.23-1.0.20" coreNavigation = "1.10.2" kotlinCompilerExtensionVersion = "1.5.12" And compose 1.6.6

This was done on a newly created project, I also tried downgrading a bit but it didn't help

coffee-code97 commented 2 months ago

F, sorry it's all good, unrelated to this.

I missed a line when modifying from default nav to this since I wanted to try it suddenly, even when I went through it a dozen times. Guess this means I need a break