scrollToPositionIfNotAtBottom method
Scrolls to the given position only if the position is not at the bottom already.
Implementation
Future<void> scrollToPositionIfNotAtBottom(
double offset, {
Duration duration = const Duration(milliseconds: 300),
Curve curve = Curves.easeInOut,
}) {
if (!isAtBottom) {
return animateToPosition(offset, duration: duration, curve: curve);
}
return Future.value();
}