I want to implement night mode in an application. So what I am trying is to update state and global variable at a time when night mode is off and on. But right now its updating current screen only using updating of a state.
So the question is how do I create a global variable that reflect the night mode change in whole application? Means updating global variable and reflect it to each and every screen without reloading the app.
Also please suggest me if there is any alternative.