withAlpha method

Color withAlpha(
  1. double alpha
)

Returns a new color with the alpha channel multiplied by the given value.

Implementation

Color withAlpha(double alpha) => Color(
      r: r,
      g: g,
      b: b,
      a: (a * alpha).round(),
    );