morphRadius static method

double morphRadius(
  1. double progress, {
  2. double maxRadius = 16.0,
})

Corner radius: maxRadius at origin → 0.0 at fullscreen.

Implementation

static double morphRadius(double progress, {double maxRadius = 16.0}) {
  final t = progress.clamp(0.0, 1.0);
  return lerpDouble(maxRadius, 0.0, t)!;
}