isAtBottom method
Checks if the scroll position is at the bottom within a threshold.
Returns true if the user is close enough to the bottom to trigger auto-scroll or other bottom-related behaviors.
The threshold parameter defines how close to the bottom
the position needs to be (in pixels).
Implementation
bool isAtBottom({double threshold = 20}) {
if (!hasClients) return true;
return position.pixels <= threshold;
}