Files
arcane_framework/lib/src/services/reactive_theme/arcane_theme.dart
T
hans f5056c36df Add configuration files and update authentication service error handling
- Introduced .vscode/settings.json and .vscode/launch.json for IDE configuration.
- Updated DebugAuthInterface and ArcaneAuthenticationService to return const Result.ok() for consistency.
- Added ArcaneTheme class for theme management.
- Updated pubspec.yaml to change result_monad dependency version.
- Modified authentication_service_test to return const Result.ok() in mock setups.

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2026-05-07 21:03:50 +02:00

27 lines
647 B
Dart

import "package:flutter/material.dart";
class ArcaneTheme extends InheritedWidget {
final ThemeMode themeMode;
final bool followSystem;
final ThemeData? theme;
const ArcaneTheme({
required super.child,
this.themeMode = ThemeMode.light,
this.followSystem = false,
this.theme,
super.key,
});
static ArcaneTheme? of(BuildContext context) {
return context.dependOnInheritedWidgetOfExactType<ArcaneTheme>();
}
@override
bool updateShouldNotify(ArcaneTheme oldWidget) {
return themeMode != oldWidget.themeMode ||
followSystem != oldWidget.followSystem ||
theme != oldWidget.theme;
}
}