withAlpha method

Color withAlpha(
  1. num a
)

Creates a copy with the given alpha channel value.

Implementation

Color withAlpha(num a) {
  assert(a >= 0 && a <= 1);
  return Color.rgba(red, green, blue, a);
}