moveTo method

Future<void> moveTo (double to, { Duration duration, Curve curve, bool clamp })

Calls jumpTo if duration is null or, otherwise animateTo is called.

If animateTo is called then curve defaults to Curves.ease. The clamp parameter is ignored by this stub implementation but subclasses like ScrollPosition handle it by adjusting to to prevent over or underscroll.


Future<void> moveTo(double to, {
  Duration duration,
  Curve curve,
  bool clamp,
}) {
  assert(to != null);
  if (duration == null || duration == {
    return Future<void>.value();
  } else {
    return animateTo(to, duration: duration, curve: curve ?? Curves.ease);