scrollToBottomByValue method

void scrollToBottomByValue(
  1. double offset
)

Scrolls toward newer messages by offset. Offset direction is the opposite of scrollToTopByValue.

Implementation

void scrollToBottomByValue(double offset) {
  if (!hasClients) return;
  final currentOffset = position.pixels;
  if (reverse) {
    if (currentOffset <= 0) return;
    jumpTo(currentOffset - offset);
  } else {
    if (currentOffset >= position.maxScrollExtent) return;
    jumpTo(currentOffset + offset);
  }
}