lerp static method

SliceData lerp(
  1. SliceData? current,
  2. SliceData target,
  3. double donutRadius,
  4. double t,
)

Lerps between two SliceData values for a factor t

Implementation

static SliceData lerp(
  SliceData? current,
  SliceData target,
  double donutRadius,
  double t,
) {
  return SliceData(
    value: lerpDouble(current?.value, target.value, t) as num,
    labelStyle: ChartTextStyle.lerp(
      current?.labelStyle,
      target.labelStyle,
      t,
    ),
    label: target.label,
    style: SliceDataStyle.lerp(current?.style, target.style, donutRadius, t),
  );
}