withAlpha method

  1. @override
Colour withAlpha(
  1. int alpha
)
override

Returns a new color that matches this color with the alpha channel replaced with a (which ranges from 0 to 255).

Out of range values will have unexpected effects.

Implementation

@override
Colour withAlpha(int alpha) =>
    Colour(alpha: alpha, red: red, green: green, blue: blue);