animateTo method

TickerFuture animateTo(
  1. double target, {
  2. Duration? duration,
  3. Curve curve = Curves.linear,
})

Drives the animation from its current value to the given target, "forward".

  • target: The target value to animate towards.
  • duration: The duration over which to animate. If null, calculates duration proportionally.
  • curve: The curve to apply during animation. Defaults to Curves.linear.

Requires:

  • Controller must be activated by a Coral resource topology before driving motion.

Returns: A TickerFuture that completes when the animation reaches target.

Throws:

Example:

controller.animateTo(0.8, duration: const Duration(milliseconds: 200));

Implementation

TickerFuture animateTo(double target,
        {Duration? duration, Curve curve = Curves.linear}) =>
    _delegate.animateTo(target, duration: duration, curve: curve);