ColorToken class

A color token that can be used in a theme.

Inheritance

Constructors

ColorToken.new(String name, Color light, {Color? dark})
const

Properties

dark → Color?
finalinherited
hashCode int
The hash code for this object.
no setteroverride
light → Color
finalinherited
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The color css value
no setteroverride

Methods

apply(Color color) ColorToken
Recreates this color token with the new color.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
withHue(double hue, {bool replace = true}) ThemeColor
Returns a new color that matches this color, but with its hue modified.
inherited
withLightness(double lightness, {bool replace = true}) ThemeColor
Returns a new color that matches this color, but with its lightness modified.
inherited
withOpacity(double opacity, {bool replace = true}) ThemeColor
Returns a new color that matches this color, but with its opacity modified.
inherited
withValues({double? red, double? green, double? blue, double? alpha}) ThemeColor
Returns a new color with the provided values replaced.
inherited

Operators

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