animateToOffset abstract method

Future animateToOffset({
  1. required double offset,
  2. required IndicatorMode mode,
  3. bool jumpToEdge = true,
  4. Duration? duration,
  5. Curve curve = Curves.linear,
  6. ScrollController? scrollController,
})

Animates the position from its current value to the given value. offset The offset to scroll to. mode When duration is null and clamping is true, set the state. jumpToEdge Whether to jump to the edge before scrolling. duration See ScrollPosition.animateTo. curve See ScrollPosition.animateTo. scrollController When position is not ScrollPosition, you can use ScrollController.

Implementation

Future animateToOffset({
  required double offset,
  required IndicatorMode mode,
  bool jumpToEdge = true,
  Duration? duration,
  Curve curve = Curves.linear,
  ScrollController? scrollController,
});