mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 10:29:06 +02:00
Removes BuildContext requirement from switchTheme method
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -48,9 +48,9 @@ class ArcaneReactiveTheme extends ArcaneService {
|
||||
///
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// ArcaneReactiveTheme.I.switchTheme(context);
|
||||
/// ArcaneReactiveTheme.I.switchTheme();
|
||||
/// ```
|
||||
ArcaneReactiveTheme switchTheme(BuildContext context) {
|
||||
ArcaneReactiveTheme switchTheme() {
|
||||
_isDark = !_isDark;
|
||||
notifyListeners();
|
||||
|
||||
@@ -70,8 +70,7 @@ class ArcaneReactiveTheme extends ArcaneService {
|
||||
context.isDarkMode ? ThemeMode.dark : ThemeMode.light;
|
||||
|
||||
if (currentMode != systemMode) {
|
||||
_isDark = !_isDark;
|
||||
notifyListeners();
|
||||
switchTheme();
|
||||
}
|
||||
|
||||
return I;
|
||||
|
||||
Reference in New Issue
Block a user