animateToPosition method

Future<void> animateToPosition(
  1. double position, {
  2. dynamic milliseconds = 300,
})

Scroll to given position with given animation duration

Implementation

Future<void> animateToPosition(double position, {milliseconds = 300}) async {
  animateTo(
    position,
    duration: Duration(milliseconds: milliseconds),
    curve: Curves.linear,
  );
}