lerp static method

Size? lerp(
  1. Size? a,
  2. Size? b,
  3. double t
)

Linearly interpolate between two sizes.

Implementation

static Size? lerp(Size? a, Size? b, double t) {
  if (a == null && b == null) return null;
  if (a == null) return b! * t;
  if (b == null) return a * (1.0 - t);

  return Size(
    _lerpDouble(a.width, b.width, t),
    _lerpDouble(a.height, b.height, t),
  );
}