animateScroll method

Future<void> animateScroll({
  1. double alignment = 0.0,
  2. Duration? duration,
  3. Curve curve = Curves.ease,
  4. ScrollPositionAlignmentPolicy alignmentPolicy = ScrollPositionAlignmentPolicy.explicit,
})

Implementation

Future<void> animateScroll({
  double alignment = 0.0,
  Duration? duration,
  Curve curve = Curves.ease,
  ScrollPositionAlignmentPolicy alignmentPolicy =
      ScrollPositionAlignmentPolicy.explicit,
}) async {
  return await Scrollable.ensureVisible(
    this,
    duration: duration ?? const Duration(milliseconds: 500),
    curve: curve,
    alignmentPolicy: alignmentPolicy,
    alignment: alignment,
  );
}