AppDelegate class

Manages the application's appearance settings and color schemes.

Properties

appearanceNotifier ValueNotifier<Appearance>
Notifies listeners of changes in the app's appearance.
getter/setter pair
colorNotifier ValueNotifier<CustomColors>
getter/setter pair
colors Map<String, dynamic>
A map of color schemes for different UI elements in light and dark modes.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAppearance() Appearance
Gets the current appearance of the app.
getColor(String colorName) Color
Gets the color for a given color name based on the current appearance.
isDark() bool
Checks if the current appearance is dark mode.
isLight() bool
Checks if the current appearance is light mode.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetAppearance() → void
Resets the appearance to light mode.
setAppearance(Appearance appearance) → void
Sets the appearance of the app and stores it in shared preferences.
setStoredAppearance() Future<void>
Sets the appearance based on the stored value in shared preferences.
storeAppearance() Future<void>
Stores the current appearance setting in shared preferences.
switchAppearance() → void
Toggles the appearance between light and dark modes and stores it.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getInstance({String? collectionName}) AppDelegate
Returns the singleton instance of AppDelegate.