smoothScrollTo method

void smoothScrollTo(
  1. double scrollLength, {
  2. Curve curve = Curves.easeIn,
  3. Duration duration = const Duration(milliseconds: 150),
})

scroll to scrollLength position in dp. Animation parameters curve and duration can be provided.

Implementation

void smoothScrollTo(double scrollLength,
    {Curve curve = Curves.easeIn,
    Duration duration = const Duration(milliseconds: 150)}) {
  scrollController.animateTo(
    scrollLength,
    curve: curve,
    duration: duration,
  );
}