spring property

  1. @override
SpringDescription get spring
override

The spring to use for ballistic simulations.

Implementation

@override
SpringDescription get spring {
  switch (decelerationRate) {
    case ScrollDecelerationRate.fast:
      return SpringDescription.withDampingRatio(
        mass: 0.3,
        stiffness: 75.0,
        ratio: 1.3,
      );
    case ScrollDecelerationRate.normal:
      return super.spring;
  }
}