How can I disable the animation when you scroll all the way to the top in ListView.builder
NotificationListener<OverscrollIndicatorNotification>(
onNotification: (OverscrollIndicatorNotification overscroll) {
overscroll.disallowGlow();
},
child: ListView.builder(...));
As official docs say
GlowingOverscrollIndicator generates OverscrollIndicatorNotification before showing an overscroll indication. To prevent the indicator from showing the indication, call OverscrollIndicatorNotification.disallowGlow on the notification.
This will help you just add this in your Listview.builder
physics: ClampingScrollPhysics(),
You can solve this problem using two methods.
if you can afford bounce back effect then simply use
ListView.builder
's propertyphysics
and set valueBouncingScrollPhysics()
like this:physics: BouncingScrollPhysics()
you can also solve it using
ScrollConfiguration
and customScrollBehavior
.
See for this post for details.