Hi. I was trying to redraw / update my AppBar backgroundColor but it doesn't rebuild itself when I toggle() my current Theme colors. AppBar only rebuilds itself with Hot Restart.
I tried:
setState
Provider
Inherited Widget
Hardcoding bool value and ternary operator to change background color, doesn't work either
Inheritance from another class
Passing values in constructor
Builder & StatefulBuilder
It only rebuilds itself with the provided values when I re Run the app | Hot Restart.
How can I rebuild this HiddenDrawerMenu when the color value has changed (with Provider for state management)?
return HiddenDrawerMenu( backgroundColorAppBar: myColor, // -> This doesn't change backgroundColorMenu: myColor, // -> This works fine screens: mynewList); }
Hi. I was trying to redraw / update my AppBar backgroundColor but it doesn't rebuild itself when I toggle() my current Theme colors. AppBar only rebuilds itself with Hot Restart.
I tried:
It only rebuilds itself with the provided values when I re Run the app | Hot Restart.
How can I rebuild this HiddenDrawerMenu when the color value has changed (with Provider for state management)?
return HiddenDrawerMenu( backgroundColorAppBar: myColor, // -> This doesn't change backgroundColorMenu: myColor, // -> This works fine screens: mynewList); }
hidden_drawer.dart
Thank you, guys.