calcVelocity method

Velocity? calcVelocity(
  1. VelocityEstimate estimate
)

计算拖拽结束后的投掷速度

Implementation

Velocity? calcVelocity(VelocityEstimate estimate) {
  return Velocity(
    pixelsPerSecond: estimate.pixelsPerSecond,
  ).clampMagnitude(minFlingVelocity, maxFlingVelocity);
}