lighter method
Makes the color lighter (more white), by the given value
, from 0
(no change) to 1
(white).
If value
is not provided, it will be 0.5 (50% change).
If value
is less than 0, it's 0. If more than 1, it's 1.
Doesn't change the opacity.
See also: ChangeColors
Implementation
Color lighter([double value = 0.5]) =>
Color.lerp(this, Colors.white, _limit(value))!.withAlpha(alpha);