lerp static method

Lerps a LineChartBarData based on t value, check Tween.lerp.

Implementation

static LineChartBarData lerp(
  LineChartBarData a,
  LineChartBarData b,
  double t,
) {
  return LineChartBarData(
    show: b.show,
    barWidth: lerpDouble(a.barWidth, b.barWidth, t)!,
    belowBarData: BarAreaData.lerp(a.belowBarData, b.belowBarData, t),
    aboveBarData: BarAreaData.lerp(a.aboveBarData, b.aboveBarData, t),
    curveSmoothness: b.curveSmoothness,
    isCurved: b.isCurved,
    isStrokeCapRound: b.isStrokeCapRound,
    isStrokeJoinRound: b.isStrokeJoinRound,
    preventCurveOverShooting: b.preventCurveOverShooting,
    preventCurveOvershootingThreshold: lerpDouble(
      a.preventCurveOvershootingThreshold,
      b.preventCurveOvershootingThreshold,
      t,
    )!,
    dotData: FlDotData.lerp(a.dotData, b.dotData, t),
    dashArray: lerpIntList(a.dashArray, b.dashArray, t),
    color: Color.lerp(a.color, b.color, t),
    gradient: Gradient.lerp(a.gradient, b.gradient, t),
    spots: lerpFlSpotList(a.spots, b.spots, t)!,
    showingIndicators: b.showingIndicators,
    shadow: Shadow.lerp(a.shadow, b.shadow, t)!,
    isStepLineChart: b.isStepLineChart,
    lineChartStepData:
        LineChartStepData.lerp(a.lineChartStepData, b.lineChartStepData, t),
  );
}