My app designer uses ONE color scheme for the whole app that some elements are appears to be dark theme and in some other place, light theme.
What I want is to apply the dark theme on screen1 and light theme on screen2. I am looking for something like this:
CompositionLocalProvider(Theme provides myLightTheme) {
Screen1()
}
CompositionLocalProvider(Theme provides myDarkTheme) {
Screen2()
}
Is that possible? Thanks
Typically you would define dark and light themes separately:
Then define a custom theme wrapper that uses
isSystemInDarkTheme()to auto switch based on system settings:So you could then just set
useDarkThemeas required: