accelerationCurve property
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:
- accelerationDuration to change the duration of the acceleration.
- decelerationCurve, the equivalent for decelerating.
Implementation
final Curve accelerationCurve;