animateTo method

void animateTo(
  1. double value, {
  2. Duration? duration,
  3. Curve? curve,
})

Implementation

void animateTo(double value, {Duration? duration, Curve? curve}) {
  _tween.begin = absFraction;
  _tween.end = value;
  _curve = curve ?? widget.config.curve;
  _animation?.dispose();
  _animation = AnimationController(
    vsync: this,
    duration: duration ?? widget.config.duration,
  );
  _animation!.addListener(() => setState(() {}));
  _animation!.forward();
}