AstryxTokenValue class
A token value: either one CSS string, or a light/dark pair.
A pair becomes light-dark(light, dark) when the theme is created. The
original pair is kept on the defined theme so consumers that need the two
halves — chart configuration, canvas painting — get them without parsing a
light-dark() string back apart.
{@tool snippet}
const AstryxTokenValue('#0064E0');
const AstryxTokenValue.lightDark('#0064E0', '#2694FE');
{@end-tool}
- Annotations
Constructors
- AstryxTokenValue(String light)
-
Creates a token value that is the same in both modes.
const
- AstryxTokenValue.lightDark(String light, String dark)
-
Creates a token value with distinct light and dark halves.
const
Properties
- css → String
-
The CSS string form: the value itself, or
light-dark(light, dark).no setter - dark → String?
-
The dark half of a pair, or null when the value is mode-independent.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isPair → bool
-
Whether this value carries distinct light and dark halves.
no setter
- light → String
-
The value, or the light half of a pair.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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