withAlpha static method

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

A factor between 0..254 represents a transparent color, while a factor of 255 will return the color entirely opaque. Factor is rounded to an int.

Implementation

static Color withAlpha(Color color, double factor) =>
    color.withAlpha(factor.restricted);