Lilly
01/27/2024, 3:07 AMsetContent {
var isDarkTheme by mutableStateOf(false)
MyTheme(isDarkTheme = isDarkTheme) {
EntryPoint(defaultRoute = Route.Test) { isDarkTheme = true }
}
}
@Composable
fun EntryPoint(defaultRoute: Route, onChangeTheme: () -> Unit) {...}
CompositionLocalProvider is no option because it is read only, true?
I could also define a public top-level state variable:
e.g. in MainActivity.kt file:
var isDarkTheme by mutableStateOf(false)
which is accessible throughou the app module. Actually a no-brainer.
Any other ideas, maybe more local?