Fixed theme

- fixed: currentMode, dark, light now actually emit new values when changed
- added: getters for lightTheme, darkTheme, and systemTheme
- breaking: currentMode -> systemTheme
- added: currentTheme
- breaking: currentMode => currentTheme
- change: Arcane.theme.followSystemTheme(context) required to follow system theme
- change: After following the system theme, calling Arcane.theme.switchTheme() cancels following the system theme
- added: ArcaneReactiveTheme is now registered in ArcaneServiceProvider when using ArcaneApp

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2025-04-18 18:15:05 +02:00
parent e9ba80bcc2
commit 2c8596d517
4 changed files with 43 additions and 24 deletions
+4 -1
View File
@@ -46,7 +46,10 @@ class ArcaneApp extends StatelessWidget {
Widget build(BuildContext context) {
return ArcaneEnvironmentProvider(
child: ArcaneServiceProvider(
serviceInstances: services,
serviceInstances: [
ArcaneReactiveTheme.I,
...services,
],
child: child,
),
);