withAlpha static method
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);