animateScroll method
Future<void>
animateScroll({
- double alignment = 0.0,
- Duration? duration,
- Curve curve = Curves.ease,
- 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,
);
}