setScrollProgressX method
Animates the horizontal scroll progress to the given value over duration.
Implementation
void setScrollProgressX(double value, Duration duration, Curve curve) {
final scrollMax = max(0.0, contentSize.width - viewportSize.width);
horizontal.moveTo(value * scrollMax, duration: duration, curve: curve);
}