lerp method

  1. @override
PaintingEffect lerp(
  1. PaintingEffect? other,
  2. double t
)
override

lerp between two painting effects

Implementation

@override
PaintingEffect lerp(PaintingEffect? other, double t) {
  if (other is PulseEffect) {
    return PulseEffect(
      from: Color.lerp(from, other.from, t)!,
      to: Color.lerp(to, other.to, t)!,
      duration: duration,
    );
  }
  return this;
}