withWhite method
The value add is added to each RGB channel of this
and clamped to be 255 or less.
Alpha channel of the returned color is maintained from this unless
a convenience pass is made for dynamic strength, which may be a
double ranging 0..1 to represent opacity or an int ranging 2..255
to represent alpha.
This method is equal but opposite to withBlack. A negative value provided here is equivalent to the positive version of that value given to withBlack.
Implementation
Color withWhite(int add, [dynamic strength]) => Color.fromARGB(
alphaFromStrength(strength) ?? alpha,
(red + add).restricted,
(green + add).restricted,
(blue + add).restricted,
);