withRed method

  1. @override
Colour withRed(
  1. int red
)
override

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

Out of range values will have unexpected effects.

Implementation

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