animateTo method

Future<void> animateTo (double to, { @required Duration duration, @required Curve curve })

Animates pixels from its current value to the given value.

The returned Future will complete when the animation ends, whether it completed successfully or whether it was interrupted prematurely.

The duration must not be zero. To jump to a particular value without an animation, use jumpTo.

Implementation

Future<void> animateTo(double to, {
  @required Duration duration,
  @required Curve curve,
});