blendColors static method

Color blendColors(
  1. Color color1,
  2. Color color2,
  3. double factor
)

Blends two colors with the given factor.

color1 is the first color. color2 is the second color. factor is the blending factor between 0.0 and 1.0.

Implementation

static Color blendColors(Color color1, Color color2, double factor) {
  return Color.lerp(color1, color2, factor)!;
}