animateTo method

Future<void> animateTo(
  1. Offset target, {
  2. required Duration duration,
  3. required Curve curve,
})

Animate the card at the top of the stack to the specified offset.

The card will not reset or snap at the end of the animation-it is up to the caller to animate the card back to the center.

Implementation

Future<void> animateTo(
  Offset target, {
  required Duration duration,
  required Curve curve,
}) async {
  _assertIsAttached();
  await _attachedSwiper!._animateTo(
    target,
    duration: duration,
    curve: curve,
  );
}