Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable the animation when you scroll all the way to the top in ListView.builder

I'm trying to make a list on my flutter app. But, Every time I scroll all the way to the top there is this animation showing up like this:

https://i.stack.imgur.com/Z7mHh.jpg, https://i.stack.imgur.com/EAIyj.jpg

Is there a way to hide this animation?

like image 229
Young Avatar asked Nov 05 '18 11:11

Young


People also ask

Is it possible to disable the scrollbar in the gallery?

I can scroll through mouse. I would like to totally disable the scrollbar. Solved! Go to Solution. 03-13-2019 01:18 PM Yes, you can disable the scrollbar (or make it not visible), but if the Gallery has more items in it than it can display in the Height of the Gallery, then it will scroll.

How to solve listview's scroll physics problem?

You can solve this problem using two methods. if you can afford bounce back effect then simply use ListView.builder 's property physics and set value BouncingScrollPhysics () like this: you can also solve it using ScrollConfiguration and custom ScrollBehavior.

How to make a scrollablepositionedlist bounce back?

if you can afford bounce back effect then simply use ListView.builder 's property physics and set value BouncingScrollPhysics () like this: you can also solve it using ScrollConfiguration and custom ScrollBehavior. See for this post for details. physics: BouncingScrollPhysics () solution does not work with ScrollablePositionedList.builder.

Can I use @keyframes to hide the opening of a scrollbar?

As we learned in the great CSS specificity battle, @keyframes have an amazing ability to override anything while they are active. Let’s use them not to animate the opening, but just for this scrollbar-hiding functionality: That does the trick!


2 Answers

This will help you just add this in your Listview.builder

physics: ClampingScrollPhysics(),
like image 112
Muhammad Asim Nawaz Avatar answered Sep 28 '22 16:09

Muhammad Asim Nawaz


You can solve this problem using two methods.

  1. if you can afford bounce back effect then simply use ListView.builder's property physics and set value BouncingScrollPhysics() like this:

    physics: BouncingScrollPhysics()
    
  2. you can also solve it using ScrollConfiguration and custom ScrollBehavior.

See for this post for details.

like image 35
Viren V Varasadiya Avatar answered Sep 28 '22 17:09

Viren V Varasadiya