dampedDismissTravel static method
The travel the sheet actually renders at, given what the finger did.
In and out in screen-height fractions (the sheet position's unit); the
damping itself works in card heights via cardFraction, the unit the
native curve is expressed in. Direct manipulation up to the knee, then
rubber-banded so a long drag parks the card instead of sliding it off
screen. Both the shrink and the fall read off this, so size and position
settle as one object — while the sheet's own position keeps tracking 1:1
underneath, leaving the dismiss threshold unaffected.
Implementation
static double dampedDismissTravel(
double travel, {
required double cardFraction,
}) {
if (cardFraction <= 0.0) return 0.0;
final raw = (travel / cardFraction).clamp(0.0, _maxDismissTravel * 4);
final damped = raw <= _dismissTravelKnee
? raw
: _dismissTravelKnee +
rubberBand(
raw - _dismissTravelKnee,
limit: _maxDismissTravel - _dismissTravelKnee,
);
return damped * cardFraction;
}