Description
In hover_preset_button.dart, the background color is assigned using a reactive GetX variable (themeController.primaryColor.value). However, the widget itself is not wrapped in an Obx stream observer.
Because of this state management leak, if the user switches the app's theme from Light Mode to Dark Mode (or vice versa), this specific button fails to rebuild. It remains stuck displaying the old theme's color palette, resulting in an unreadable UI glitch until the app is fully restarted.
Steps to Reproduce
- Navigate to the screen containing the
HoverPresetButton (e.g., settings or alarm configuration).
- Toggle the application theme from Light Mode to Dark Mode.
- Observe that the rest of the UI updates, but the
HoverPresetButton background color remains stuck on the Light Mode color.
Expected Behavior
The button should reactively listen to theme changes and update its background color immediately without requiring an app restart.
Proposed Solution
Wrap the widget returning the themeController.primaryColor.value inside an Obx(() => ...) widget so it actively listens to the theme controller's state changes.
Description
In
hover_preset_button.dart, the background color is assigned using a reactive GetX variable (themeController.primaryColor.value). However, the widget itself is not wrapped in anObxstream observer.Because of this state management leak, if the user switches the app's theme from Light Mode to Dark Mode (or vice versa), this specific button fails to rebuild. It remains stuck displaying the old theme's color palette, resulting in an unreadable UI glitch until the app is fully restarted.
Steps to Reproduce
HoverPresetButton(e.g., settings or alarm configuration).HoverPresetButtonbackground color remains stuck on the Light Mode color.Expected Behavior
The button should reactively listen to theme changes and update its background color immediately without requiring an app restart.
Proposed Solution
Wrap the widget returning the
themeController.primaryColor.valueinside anObx(() => ...)widget so it actively listens to the theme controller's state changes.