Hello! I have an issue that I want to switch to da...
# compose
a
Hello! I have an issue that I want to switch to dark mode without using
Copy code
AppCompatDelegate.setDefaultNightMode(true)
Because when I use that it's blank and I loose the state of some variables. But when using just Theme:
Copy code
val autColors = if (isSystemInDarkTheme()) DarkColorPalette else LightColorPalette
It works great like I want just with one issue is when navigate from screen to another a white flash apears !!! this happen just with Dark mode. So anyone here was able to solve this issue ?
t
is some layer above the screens, like a nav host or something in the heirarchy that isn’t getting the theme’s colors?
a
Yes
@Tash Did you notice the white screen that appear (like a flash) Do you know how to fix it without using
AppCompatDelegate.setDefaultNightMode(true)
?