info: minor fix to top overscroll detection

This commit is contained in:
Thibault Deckers 2020-06-05 12:47:31 +09:00
parent 7a5ad21c36
commit 40a31a667d

View file

@ -130,7 +130,9 @@ class InfoPageState extends State<InfoPage> {
_scrollStartFromTop = metrics.pixels == metrics.minScrollExtent; _scrollStartFromTop = metrics.pixels == metrics.minScrollExtent;
} }
if (_scrollStartFromTop) { if (_scrollStartFromTop) {
if (notification is ScrollEndNotification) { if (notification is ScrollUpdateNotification) {
_scrollStartFromTop = notification.scrollDelta < 0;
} else if (notification is ScrollEndNotification) {
_scrollStartFromTop = false; _scrollStartFromTop = false;
} else if (notification is OverscrollNotification) { } else if (notification is OverscrollNotification) {
if (notification.overscroll < 0) { if (notification.overscroll < 0) {