Dark mode on/off all screen

In Kodular, I have an app with two screens. Each screen contains a switch. On the first screen, there are 25 levels arranged using a vertical scroll. When a level is clicked, it opens the second screen, which initially has only a white background.

When the switch on the first screen is turned on, dark mode should be enabled. After enabling dark mode, if a level is clicked to open the second screen, dark mode should also be active there.

Additionally, if dark mode is toggled on or off from the second screen, and the user navigates back to the first screen using the back button, the dark mode setting should remain consistent with the second screen. Also, the vertical scroll position from the first screen should be preserved when returning.

Maybe it can help

1 Like

Also, for more effective use, you can try these low blocks, useful as your requirement :slight_smile:

Thank you Ibrahim for sharing my guide. However, if you only have two themes light and dark,
you could use this method instead, which is simpler.

when changing screen from 1 to 2
blocks(15)

Screen2

3 Likes