CCExtractor / CCExtractor/ultimate_alarm_clock

Broken Dark Mode Toggle (The State Management Leak)

Offen
#945 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Dart
Sterne
112
Forks
227
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.