ALL BUSINESS
COMIDA
DIRECTORIES
EDUCATIONAL
ENTERTAINMENT
FASHION TIPS
FINER THINGS
FREE CREATOR TOOLS
HEALTH
MARKETPLACE
MEMBER's ONLY
MONEY MATTER$
MOTIVATIONAL
NEWS & WEATHER
TECHNOLOGIA
TELEVISION NETWORKS
USA VOTES 2024
VIDEOS
INVESTOR RELATIONS
IN DEVELOPMENT
Posted by - Latinos MediaSyndication -
on - August 11, 2023 -
Filed in - Technology -
-
440 Views - 0 Comments - 0 Likes - 0 Reviews
I'm doing something like a news feed and I'm using CustomScrollView with two slivers (one for initially loaded news and one for new news that should not shift elements when loaded).
Example:
return CustomScrollView( center: centerKey, slivers: [ renderOneList(newItems), renderOneList(oldItems, centerKey), ], );
Everything works as it should. I use UniqueKey to define the first element where the initial reading starts. Once every X seconds, I load new items and put them into an array of newItems. They are added to the top and the user can scroll to the top.
However, when clicking on the status bar in iOS Primary Scroll Controller scrolls to position 0 (which in my case is the boundary of new news and old news). This is correct from Flutter's point of view, but it's not the behavior I would like to achieve. Any ideas on how to scroll to the top?
What I think about it:
I ended up with a dead end, but I'm sure the community has solved such a basic problem before. Hope for some help.