M3EThemeController class
Manual brightness control for an adaptive M3ETheme root.
When autoTheming is enabled, toggleBrightness inverts relative to the
platform brightness instead of locking an absolute override. When
autoTheming is off, brightnessOverride takes precedence until
followSystem is called.
- Inheritance
-
- Object
- ChangeNotifier
- M3EThemeController
Constructors
Properties
- brightnessOverride → Brightness?
-
Active manual brightness, or null when following system/initial rules.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- invertPlatformBrightness → bool
-
Whether platform brightness is inverted when
autoThemingis enabled.no setter - materialThemeMode → ThemeMode
-
Material ThemeMode derived from the manual override, if any.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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.
inherited
-
effectiveThemeMode(
{required Brightness platformBrightness, required bool autoTheming, Brightness? initialTheme}) → ThemeMode - Resolves ThemeMode from platform brightness and adaptive rules.
-
followSystem(
) → void -
Clears manual overrides so
autoTheming/initialThemeapply again. -
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
-
resolveBrightness(
Brightness platformBrightness, {required bool autoTheming, Brightness? initialTheme}) → Brightness -
Resolves effective brightness for an adaptive
M3EThemeroot. -
setBrightness(
Brightness brightness) → void -
Locks the theme to
brightnessuntil followSystem is called. -
toggleBrightness(
{Brightness fallback = Brightness.light, bool autoTheming = false}) → void - Toggles between light and dark.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
themeModeFor(
Brightness brightness) → ThemeMode -
Material ThemeMode for the given effective
brightness.