Open TechnicJelle opened 2 months ago
I think I know what might be happening...
When you click the FAB, it reads out the maxScrollExtent
, and starts scrolling to that exact pixel value.
But when new stuff gets added to the ListView
, that gets added after that pixel value.
So it scrolls to the position that used to be the bottom, when the FAB was clicked, instead of to the actual bottom at the end-moment of the animation.
I still do not know how to properly solve this...
I've found this solution: https://stackoverflow.com/a/74134507/8109619, but that's also far from ideal, due to the linear scroll. And honestly, I'd rather keep the current solution that teleports at the end-moment of the animation, instead.
I've decided this bug is not important enough to fix before 1.0. I hope to be able to find a solution to this at some point in the future.
Currently, the
animateTo
function does not always properly scroll all the way to the actual bottom, so there is a.then(() => _scrollToBottom())
call after it. This should not be necessary.https://github.com/TechnicJelle/BlueMapGUI/blob/9f3926b8fc3735021ce290d977d5775b4cec0cfd/lib/console.dart#L137-L145