DavideBelsole / great_list_view

pub.dev library for flutter
MIT License
39 stars 21 forks source link

A way to make scrolling/non-scrolling behavior resulting from adding a new item a bit more predictable #5

Closed makoConstruct closed 2 years ago

makoConstruct commented 3 years ago

When you insert an item just a small bit above the the items that're currently visible, sometimes everything visible will be displaced downwards by it. This seems like a mistake to me. If I'm not scrolled in the position where I would see the new item come in, I don't want the appearance of the new item to move the things I'm looking at around.

If great_list_view had been used to make a chat window, for instance, if the user is scrolled up by any amount at all, they have communicated to the app that they're reading chat backlog and that they don't want new messages to disrupt their reading by making things move. That applies to every use case I can think of for inserting items out of view. Currently, great_list_view would do the wrong thing there a lot of time.

makoConstruct commented 3 years ago

Additionally, might be good to provide an option for never moving the view at all relative to the top-most item, this seems to be preferable to some

DavideBelsole commented 3 years ago

This feature will be released in future releases.

DavideBelsole commented 2 years ago

Try the version 0.1.2. Add the new attribute holdScrollOffset = true. I suggest setting cacheExtent = 0 as well. Remember to update flutter too.