lerpedValue method

T lerpedValue(
  1. T a,
  2. T b,
  3. double t
)

Implementation

T lerpedValue(T a, T b, double t) {
  if (widget.lerp != null) {
    return widget.lerp!(a, b, t);
  }
  try {
    return (a as dynamic) + ((b as dynamic) - (a as dynamic)) * t;
  } catch (e) {
    throw Exception(
      'Could not lerp $a and $b. You must provide a custom lerp function.',
    );
  }
}