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:

Inheritance

Static Methods

of(BuildContext context, { bool shadowThemeOnly: false }) ThemeData

The data from the closest Theme instance that encloses the given context.

Constructors

Theme({Key key, @required ThemeData data, bool isMaterialAppTheme: false, Widget child })

Applies the given theme data to child.

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