decelerationCurve property

_IntegralCurve decelerationCurve
final

The deceleration at the end of each round.

At the end of each round, the deceleration is defined by this curve where 0.0 stands for not moving and 1.0 for the target velocity. Notice that it's useless to set this curve if you leave the accelerationDuration at the default of Duration.zero. Also notice that you don't provide the scroll position, but the actual velocity, so this curve gets integrated.

Sample code

A marquee that decelerates with a custom curve.

Marquee(
  decelerationDuration: Duration(seconds: 1),
  decelerationCurve: Curves.easeInOut,
  text: 'Decelerating with a custom curve.'
)

See also:

Implementation

final _IntegralCurve decelerationCurve;