AppDelegate class
Manages the application's appearance settings and color schemes and popUp.
Properties
-
appearanceNotifier
↔ ValueNotifier<
Appearance> -
Notifies listeners of changes in the app's appearance.
getter/setter pair
-
colorNotifier
↔ ValueNotifier<
CustomColors> -
Notifies listeners of changes in the app's of
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
-
defaultPopUp
↔ ValueNotifier<
List< Widget> > -
Notifies listeners of changes in the app's for the popUp
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.
-
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.
-
showPopUp(
{required BuildContext context, EdgeInsetsGeometry? padding, Color? background, Widget? child, bool withActions = false, bool roundedButtons = false, Function? action1, Function? action2, String? text1, String? text2}) → void -
Show a popUp from anywhere (with context) with the
defaultPopUp
(from the AppDelegate) or a custom (child
) -
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
.