I created a program that has a button to change the theme of the app(dark and light theme). I want to save the settings that if the button was selected, after the app reopens, the preferences gets saved and the button remains selected. How can I do that?