Commit Graph

6 Commits

Author SHA1 Message Date
hans b0c9fe7b98 Refactor theme management to use ValueListenableBuilder for effective theme updates
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-07-01 16:56:30 +02:00
hans f8dcaf3c6c Refactor theme management to use ValueNotifier for reactive updates
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-07-01 16:35:31 +02:00
hans 6764d8074a Setting a theme style now automatically switches to that theme
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans e402308f7b Fixes broken tests
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 2c8596d517 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>
2025-04-29 14:16:17 +02:00
hans ac82e93b9d [UNTESTED] Fixes notifiers and adds some additional methods. Adds tests.
Changes:
// ArcaneEnvironment
breaking: context.read<ArcaneEnvironment>() -> ArcaneEnvironment.of(context)
breaking: context.read<ArcaneEnvironment>().state -> ArcaneEnvironment.of(context).environment;

// Feature flag service
added: reset()

// Logging service
added: registerInterface()
added: unregisterInterfaces()
added: unregisterAllInterfaces()

// ArcaneReactiveTheme
fixed: currentMode, dark, light now actually emit new values when changed
added: getters for lightTheme, darkTheme, and systemTheme
TODO: test systemTheme

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00