Applies a theme to descendant widgets.
A theme describes the colors and typographic choices of an application.
Descendant widgets obtain the current theme's ThemeData object using Theme.of. When a widget uses Theme.of, it is automatically rebuilt if the theme later changes, so that the changes can be applied.
See also:
- ThemeData, which describes the actual configuration of a theme.
- AnimatedTheme, which animates the ThemeData when it changes rather than changing the theme all at once.
- MaterialApp, which includes an AnimatedTheme widget configured via the theme argument.
- Inheritance
Static Methods
-
of(
BuildContext context, { bool shadowThemeOnly: false }) → ThemeData -
The data from the closest Theme instance that encloses the given context.
Constructors
Properties
- data → ThemeData
-
Specifies the color and typography values for descendant widgets.
read-only - isMaterialAppTheme → bool
-
True if this theme was installed by the MaterialApp.
read-only - child → Widget
-
The widget below this widget in the tree.
read-only, inherited - hashCode → int
-
Get a hash code for this object.
read-only, inherited - key → Key
-
Controls how one widget replaces another widget in the tree.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
debugFillDescription(
List<String> description) → void -
Add additional information to the given description for use by
toString
. -
updateShouldNotify(
Theme old) → bool -
Whether the framework should notify widgets that inherit from this widget.
-
createElement(
) → InheritedElement -
Inflates this configuration to a concrete instance.
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited -
toStringShort(
) → String -
A short, textual description of this widget.
inherited