lerp static method

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

Implementation

static BackgroundBarChartRodData lerp(
  BackgroundBarChartRodData a,
  BackgroundBarChartRodData b,
  double t,
) {
  return BackgroundBarChartRodData(
    fromY: lerpDouble(a.fromY, b.fromY, t),
    toY: lerpDouble(a.toY, b.toY, t),
    color: Color.lerp(a.color, b.color, t),
    // ignore: invalid_use_of_protected_member
    gradient: a.gradient?.lerpTo(b.gradient, t),
    show: b.show,
  );
}