Flutter reload when variable changed?
I have a variable (string) called darklightmode. In my settings, this is always set to dark and light, depending on what button is pressed. Now I want this to change the theme in the build widget accordingly. I've already done all of that; the variable is also transferred to the main.dart file. However, the build widget doesn't update when the variable changes. Does anyone have any idea how I can solve this problem?
https://itnext.io/an-easy-way-to-switch-between-dark-and-light-theme-in-flutter-fb971155efe