isAtBottom method
Whether the list is scrolled within threshold logical pixels of the
newest message. Returns true when not attached to a scroll view.
Implementation
bool isAtBottom({double threshold = 20}) {
if (!hasClients) return true;
if (reverse) {
return position.pixels <= threshold;
} else {
return (position.maxScrollExtent - position.pixels) <= threshold;
}
}