darken method

Color darken([
  1. double factor = 0.1
])

Darkens the color by blending it with black.

Implementation

Color darken([double factor = 0.1]) {
  return Color.lerp(this, Colors.black, factor.clamp(0.0, 1.0)) ?? this;
}