withAlpha static method
Returns a new color that matches this color with the alpha channel replaced with a (which ranges from 0 to 255).
Implementation
static Color? withAlpha(Color? color, int? alpha) {
return alpha != null ? color?.withAlpha(alpha) : color;
}