apply method

ColorToken apply(
  1. Color color
)

Recreates this color token with the new color.

If color is a ThemeColor, it will apply both the light and dark colors. Else only the light color will be applied.

Implementation

ColorToken apply(Color color) {
  return ColorToken(name, color, dark: color is ThemeColor ? color.dark : null);
}