CCExtractor / CCExtractor/ultimate_alarm_clock
Broken Dark Mode Toggle (The State Management Leak)
- 主要言語
- Dart
- スター
- 112
- フォーク
- 227
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### 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
1. Navigate to the screen containing the `HoverPresetButton` (e.g., settings or alarm configuration).
2. Toggle the application theme from Light Mode to Dark Mode.
3. 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.
コントリビューションガイド
評価
この issue はまだ評価されていません。