ColorThemeData class

Descendant widgets obtain the current ColorThemeData object using AlertTheme.of(context). Instances of ColorThemeData can be customized with ColorThemeData.copyWith or ColorThemeData.merge.

Inheritance
Mixed in types
Implementers
Annotations

Constructors

ColorThemeData({required Color danger, required Color warning, required Color success, required Color info})
Creates a theme data that can be used for ColorTheme.
const
ColorThemeData.defaults(BuildContext context)
A ColorThemeData with default values.
factory
ColorThemeData.from([ColorThemeData? other])
Creates a ColorThemeData from another one that probably null.

Properties

danger Color
The Color to be applied to the alert widget
final
hashCode int
The hash code for this object.
no setteroverride
info Color
The Color to be applied to the alert widget
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
success Color
The Color to be applied to the alert widget
final
type Object
The extension's type.
no setterinherited
warning Color
The Color to be applied to the alert widget
final

Methods

copyWith({Color? danger, Color? warning, Color? success, Color? info}) ColorThemeData
Creates a copy of this ColorThemeData but with the given fields replaced with the new values.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
lerp(covariant ThemeExtension<ColorThemeData>? other, double t) ColorThemeData
Linearly interpolate with another ThemeExtension object.
override
merge(ColorThemeData? other) ColorThemeData
Creates a copy of this ColorThemeData but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toMap() Map<String, dynamic>
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Constants

fallback → const ColorThemeData
A ColorThemeData with some reasonable default values.