lerpFrom method

  1. @override
PaintStyle lerpFrom(
  1. covariant PaintStyle from,
  2. double t
)

Linearly interpolate between this style and from.

Implementation

@override
PaintStyle lerpFrom(covariant PaintStyle from, double t) => PaintStyle(
      fillColor: Color.lerp(from.fillColor, fillColor, t),
      fillGradient:
          painting.Gradient.lerp(from.fillGradient, fillGradient, t),
      fillShader: fillShader,
      strokeColor: Color.lerp(from.strokeColor, strokeColor, t),
      strokeGradient:
          painting.Gradient.lerp(from.strokeGradient, strokeGradient, t),
      strokeShader: strokeShader,
      gradientBounds: Rect.lerp(from.gradientBounds, gradientBounds, t),
      blendMode: blendMode,
      strokeWidth: lerpDouble(from.strokeWidth, strokeWidth, t),
      strokeCap: strokeCap,
      strokeJoin: strokeJoin,
      strokeMiterLimit:
          lerpDouble(from.strokeMiterLimit, strokeMiterLimit, t),
      elevation: lerpDouble(from.elevation, elevation, t),
      shadowColor: Color.lerp(from.shadowColor, shadowColor, t),
      dash: _lerpDash(from.dash, dash, t),
      dashOffset: dashOffset,
    );