Theme class

A widget that defines the theme for its subtree.

Use Theme.of to access the current theme data from any descendant.

Inheritance

Constructors

Theme({Key? key, required ThemeData data, required Widget child})
const

Properties

child Widget
final
data ThemeData
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
override
createElement() Element
inherited
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

of(BuildContext context) ThemeData