withAlpha static method

Color withAlpha(
  1. Color color,
  2. double alpha
)

Creates a color with the given alpha value.

color is the base color. alpha is the alpha value between 0.0 and 1.0.

Implementation

static Color withAlpha(Color color, double alpha) {
  return color.withValues(alpha: alpha);
}