Closed izayl closed 5 years ago
This function scroll only one round trip. If you provide an acceleration or deceleration curve and duration, you'll see that the marquee slowly starts to scroll, then scrolls linearly and then, finally stops. Example:
Marquee(
text: 'Some sample text that takes some space.',
pauseAfterRound: Duration(seconds: 1),
accelerationDuration: Duration(seconds: 1),
accelerationCurve: Curves.linear,
decelerationDuration: Duration(milliseconds: 500),
decelerationCurve: Curves.easeOut,
)
I'm confused to this
_makeRoundTrip
function, why there are three phase: accelerate/ linear/ decelerate?my version for implement auto scroll is just use a infinite loop:
But this loop will cost more CPU load.