morphHeight static method

double morphHeight(
  1. double progress, {
  2. double cardHeightFraction = 0.75,
})

Card height as fraction of available height. At progress 0.0 → cardHeightFraction, at 1.0 → 1.0 (fullscreen).

Implementation

static double morphHeight(
  double progress, {
  double cardHeightFraction = 0.75,
}) {
  final t = progress.clamp(0.0, 1.0);
  return lerpDouble(cardHeightFraction, 1.0, t)!;
}