InheritedTheme class
Inherited theme component propagated down the component tree.
Constructors
-
InheritedTheme({Key? key, required ThemeMode mode, required Tokens tokens, required Component child, required Brightness brightness, Brightness? systemBrightness, required ValueChanged<
ThemeMode> onSetMode, required VoidCallback onToggleMode}) -
Creates an InheritedTheme instance.
const
Properties
- brightness → Brightness
-
Brightness of the active theme.
final
- child → Component
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one component replaces another component in the tree.
finalinherited
- mode → ThemeMode
-
Active theme mode.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- systemBrightness → Brightness?
-
Brightness preference of the browser.
Returns
nullin server mode.final - tokens → Tokens
-
Design tokens for the active theme.
final
Methods
-
createElement(
) → InheritedElement -
Inflates this configuration to a concrete instance.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setMode(
ThemeMode mode) → void - Sets the theme mode to the provided mode.
-
toggleMode(
) → void - Toggles the theme mode between light, dark, and system.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateShouldNotify(
covariant InheritedTheme oldComponent) → bool - Whether the framework should notify components that inherit from this component.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited