calcVelocity method
计算拖拽结束后的投掷速度
Implementation
Velocity? calcVelocity(VelocityEstimate estimate) {
return Velocity(
pixelsPerSecond: estimate.pixelsPerSecond,
).clampMagnitude(minFlingVelocity, maxFlingVelocity);
}
计算拖拽结束后的投掷速度
Velocity? calcVelocity(VelocityEstimate estimate) {
return Velocity(
pixelsPerSecond: estimate.pixelsPerSecond,
).clampMagnitude(minFlingVelocity, maxFlingVelocity);
}