ArcaneReactiveTheme class
A singleton service that manages theme switching and customization for the application.
ArcaneReactiveTheme
allows switching between light and dark themes and provides
methods to customize the themes. The current theme mode can be accessed, and the
theme can be switched at runtime.
- Inheritance
-
- Object
- ArcaneService
- ArcaneReactiveTheme
Properties
- currentMode → ThemeMode
-
Returns the current theme mode based on
_isDark
.no setter - dark → ThemeData
-
Returns the current dark theme
ThemeData
.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- light → ThemeData
-
Returns the current light theme
ThemeData
.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
systemTheme
→ ValueListenable<
ThemeMode> -
A listenable that notifies listeners when the syste theme mode changes.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
followSystemTheme(
BuildContext context) → ArcaneReactiveTheme - Switches the current theme between light and dark modes automatically based upon the system's current mode.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setDarkTheme(
ThemeData theme) → ArcaneReactiveTheme -
Sets a custom
ThemeData
for the dark theme. -
setLightTheme(
ThemeData theme) → ArcaneReactiveTheme -
Sets a custom
ThemeData
for the light theme. -
switchTheme(
) → ArcaneReactiveTheme - Switches the current theme between light and dark modes.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- I → ArcaneReactiveTheme
-
Provides access to the singleton instance of
ArcaneReactiveTheme
.no setter