animateTo method
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);
}