dismissScale static method
Uniform scale the sheet wears travel into a swipe-to-dismiss.
Strictly linear in dampedDismissTravel — all of the easing lives in the
travel, so there is exactly one curve to reason about and the shrink can
never disagree with the fall. cardFraction is the card's height as a
fraction of the screen's, the normaliser the whole curve works in.
Implementation
static double dismissScale(double travel, {required double cardFraction}) {
if (cardFraction <= 0.0) return 1.0;
return 1.0 -
dismissScaleGain *
(dampedDismissTravel(travel, cardFraction: cardFraction) /
cardFraction);
}