animateToCoordinate method

Future<void> animateToCoordinate(
  1. IntVector2 coordinate, {
  2. Duration duration = kDefaultScrollAnimationDuration,
  3. Curve curve = kDefaultScrollAnimationCurve,
})

Animate the scroll in both axis to make a specific coordinate visible.

See also:

Implementation

Future<void> animateToCoordinate(
  IntVector2 coordinate, {
  Duration duration = kDefaultScrollAnimationDuration,
  Curve curve = kDefaultScrollAnimationCurve,
}) =>
    Future.wait([
      animateToHeader(
        coordinate.dx,
        Axis.horizontal,
        duration: duration,
        curve: curve,
      ),
      animateToHeader(
        coordinate.dy,
        Axis.vertical,
        duration: duration,
        curve: curve,
      ),
    ]);