withLightness method
Returns a new color that matches this color, but with its lightness modified.
By default, the current lightness is replaced with the given lightness value (which ranges from 0.0 to 1.0).
When replace
is false, the current lightness will be increased or decreased by the specified
amount (ranging from -1.0 to 1.0).
Implementation
@override
ThemeColor withLightness(double lightness, {bool replace = true}) {
return ThemeColor(
light.withLightness(lightness, replace: replace),
dark: dark?.withLightness(lightness, replace: replace),
);
}