lerp method

Margin lerp(
  1. Margin other,
  2. double t
)

Interpolates between this margin and another.

Implementation

Margin lerp(Margin other, double t) {
  return Margin(
    top: top + (other.top - top) * t,
    right: right + (other.right - right) * t,
    bottom: bottom + (other.bottom - bottom) * t,
    left: left + (other.left - left) * t,
  );
}