summaryrefslogtreecommitdiff
path: root/player-android/lib/providers/theme_provider.dart
AgeCommit message (Collapse)Author
2026-05-22Fix Material 3 theming review issues (task fb)Paul Buetow
- Roll back ThemeNotifier state on SharedPreferences write failure so in-memory and disk never diverge - Fix stale comment: scaffoldBackgroundColor ← --bg-body (not background) - Fix source attribution: theme.css not docs/theming.md - Make _ThemeToggle const-constructible; remove incorrect ignore comment - Inline _buildSegmentedButton into _ThemeToggle.build (was a trivial passthrough) - Add defensive isNotEmpty comment on SegmentedButton.onSelectionChanged - Hoist buildLightTheme()/buildDarkTheme() to module-level finals in main.dart so ThemeData is built once at startup rather than on every rebuild - Add _ThemeToggle tests: initial segment selection and segment tap dispatch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22Implement Material 3 theming with light + dark mode toggle (fb)Paul Buetow
Adds ThemeNotifier (AsyncNotifier) backed by shared_preferences to persist the user's light/dark/system preference across restarts. Color schemes derive from the dark and light palettes defined in player-server/docs/theming.md. MaterialApp now consumes themeProvider for themeMode, theme, and darkTheme; SettingsScreen gains a SegmentedButton appearance section for the toggle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>