ThemeData class

Describes the visual appearance of the application.

Contains color and style tokens that Theme widgets distribute to descendants via Theme.of.

Constructors

ThemeData({Color primaryColor = Colors.blue, Color backgroundColor = Colors.black, Color textColor = Colors.white, Color selectedColor = Colors.blue, Color borderColor = Colors.white, Color dividerColor = Colors.white})
Creates a ThemeData with customizable color tokens.
const

Properties

backgroundColor Color
The default background color.
final
borderColor Color
The color used for borders.
final
dividerColor Color
The color used for dividers.
final
hashCode int
The hash code for this object.
no setteroverride
primaryColor Color
The primary accent color used for interactive elements.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedColor Color
The color applied to selected items.
final
textColor Color
The default text color.
final

Methods

copyWith({Color? primaryColor, Color? backgroundColor, Color? textColor, Color? selectedColor, Color? borderColor, Color? dividerColor}) ThemeData
Creates a copy of this theme with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

dark ThemeData
A pre-built dark theme.
no setter
light ThemeData
A pre-built light theme.
no setter