morphRect static method

Rect morphRect(
  1. double progress,
  2. Rect start,
  3. Rect end
)

Interpolated rect from start to end at progress.

Implementation

static Rect morphRect(double progress, Rect start, Rect end) {
  final t = progress.clamp(0.0, 1.0);
  return Rect.lerp(start, end, t)!;
}