Skip to content

Commit

Permalink
馃悰 Fix the ScrollController issue
Browse files Browse the repository at this point in the history
Fix #3
  • Loading branch information
RockerFlower committed Aug 9, 2022
1 parent d10d475 commit 5dbad31
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/ui/pages/watchlist/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,15 @@ class WatchlistController extends BaseController {
update();
lastVelocity = velocity;
});
scrollController.position.isScrollingNotifier.addListener(() {
if (!scrollController.position.isScrollingNotifier.value) {
velocity = 0;
update();
} else {}
});

if (scrollController.hasClients) {
scrollController.position.isScrollingNotifier.addListener(() {
if (!scrollController.position.isScrollingNotifier.value) {
velocity = 0;
update();
} else {}
});
}
});
}

Expand Down

0 comments on commit 5dbad31

Please sign in to comment.