Light / Dark theme and Ionic Storage

I’m trying to do a project with light and dark mode and I thought that the best idea will be saving a key on Ionic Storage and based on that key to show the users their favorite mode (light or dark mode). I’m setting a default key on ionic/storage named “theme” with the value false so the mode will be light but if i want to change the value to true the mode needs to be dark so the next time I enter my theme will be based on my value on storage so i don’t need to change it everytime. The problem is that I tried to do this but the value won’t change instantly but I need to refresh the page in order to change the value. So I’m asking if there is any chance that I can do this with Ionic/Storage or maybe you know any better idea. Thank you