Theme of Flutter app changes only after Hot Restart
I'm trying to implement a feature whose job is to switch beetween light and dark mode using BLoC and SharedPreferences. Through debug prints I know that the DarkModeCubit is working properly. However the MainApp doesn't receive the new state immediately…