withOpacity method

Color withOpacity(
  1. double opacity
)

Creates a new color based on this color with the specified opacity, unpremultiplied.

Implementation

Color withOpacity(double opacity) {
  return Color.fromRGBO(r, g, b, opacity);
}