withAlphaRatio method

Color withAlphaRatio(
  1. double aRatio
)

Returns a new color with alpha value aRatio * 255.

Implementation

Color withAlphaRatio(double aRatio) {
  return Color.fromARGB((255 * aRatio).toInt(), red, green, blue);
}