accelerationCurve property

Curve accelerationCurve
final

The acceleration at the start of each round.

At the start of each round, the acceleration 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 the curve if you leave the accelerationDuration at the default of Duration.zero. Also notice that you don't provide the scroll positions, but the actual velocity, so this curve gets integrated.

Sample code

A marquee that accelerates with a custom curve.

Marquee(
  accelerationDuration: Duration(seconds: 1),
  accelerationCurve: Curves.easeInOut,
  text: 'Accelerating with a custom curve.'
)

See also:

Implementation

final Curve accelerationCurve;