ThemeHelper class

Utility class for accessing theme data with fallback support.

This class provides methods to access theme properties that work even when CupertinoApp is not in the widget tree (e.g., when using MaterialApp with autoroute or other routing solutions).

Constructors

ThemeHelper()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getBrightness(BuildContext context) Brightness
Gets the brightness (light/dark mode) from the theme.
getPrimaryColor(BuildContext context) Color
Gets the primary/accent color from the theme.
isDark(BuildContext context) bool
Checks if the current theme is dark mode.