scrollToBottom method

Future<void>? scrollToBottom(
  1. String key, {
  2. Duration duration = const Duration(milliseconds: 300),
  3. Curve curve = Curves.easeInOut,
})

Scrolls to the bottom of the scrollable for the controller with key.

Implementation

Future<void>? scrollToBottom(
  String key, {
  Duration duration = const Duration(milliseconds: 300),
  Curve curve = Curves.easeInOut,
}) {
  final maxExtent = getMaxScrollExtent(key);
  if (maxExtent == null) return null;
  return animateTo(key, maxExtent, duration: duration, curve: curve);
}