Color withAlpha(int a)

Returns a new color that matches this color with the alpha channel replaced with a (which ranges from 0 to 255).

Source

Color withAlpha(int a) {
  return new Color.fromARGB(a, red, green, blue);
}