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>
26 lines
495 B
YAML
26 lines
495 B
YAML
name: fai_studio
|
|
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
|
publish_to: 'none'
|
|
version: 0.7.3
|
|
|
|
environment:
|
|
sdk: ^3.11.0-200.1.beta
|
|
|
|
dependencies:
|
|
flutter:
|
|
sdk: flutter
|
|
cupertino_icons: ^1.0.8
|
|
|
|
# Sibling package; will move to Forgejo path once published.
|
|
fai_dart_sdk:
|
|
path: ../fai_dart_sdk
|
|
google_fonts: ^8.1.0
|
|
shared_preferences: ^2.5.5
|
|
|
|
dev_dependencies:
|
|
flutter_test:
|
|
sdk: flutter
|
|
flutter_lints: ^6.0.0
|
|
|
|
flutter:
|
|
uses-material-design: true
|