animateTo method

TickerFuture animateTo({
  1. double? from,
  2. required double to,
  3. Curve curve = Curves.easeOut,
})

Implementation

TickerFuture animateTo(
    {double? from, required double to, Curve curve = Curves.easeOut}) {
  assert(() {
    if (duration == null) {
      throw FlutterError(
          'AnimationController.collapse() called with no default Duration.\n'
          'The "duration" property should be set, either in the constructor or later, before '
          'calling the collapse() function.');
    }
    return true;
  }());
  if (from != null) value = from;
  return _animateToInternal(to, curve: curve);
}