chain-studio/lib
flemming-it 2f32023322 fix(ui): theme toggle is now actually reactive
The toggle changed _mode and called setState on StudioAppState,
but the sidebar that hosts the toggle button never rebuilt:
StudioApp returns `MaterialApp(home: const StudioShell())`, and
the const child's element doesn't get a didUpdateWidget on
parent rebuild. So the toggle's icon would only flip on the
next health-poll tick (up to 5s later) when the sidebar's own
setState fired for an unrelated reason.

Switch to a ValueNotifier-based pattern:
- StudioAppState exposes `modeNotifier` (ValueNotifier<...>)
  instead of a getter.
- StudioApp wraps MaterialApp in a ValueListenableBuilder
  bound to the notifier so themeMode flips immediately.
- _ThemeToggle is itself a ValueListenableBuilder against the
  same notifier — its icon and onPressed always reflect the
  current value without depending on parent rebuild timing.

Bumps fai_studio 0.7.2 -> 0.7.3.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
2026-05-05 23:00:45 +02:00
..
data feat(ui): theme-mode toggle (system / light / dark) with persistence 2026-05-05 22:19:13 +02:00
pages fix(ui): stat-tile overflow + visible build version 2026-05-05 22:41:26 +02:00
theme feat(ui): warm-minimalism redesign — design tokens + 6 primitives + animated ∆ 2026-05-05 21:49:37 +02:00
widgets fix(ui): visible ∆ pulse + drop internal codename from version line 2026-05-05 22:51:19 +02:00
main.dart fix(ui): theme toggle is now actually reactive 2026-05-05 23:00:45 +02:00