2

Is it possible to add new elements into the top of the ListVeiw or CustomScrollView and keep the scroll position as it's with Flutter

I've tried the following

extentAfter = _scrollController.position.extentAfter;
_scrollController.jumpTo(_scrollController.position.maxScrollExtent - extentAfter);

but this won't work well with SliverAppBar - floating and its actually not optimal solution.

L.kifa
  • 95
  • 1
  • 9

1 Answers1

2

Actually the cleanest way would be to add those items only when user scrolls back to the top of the ListView. You can cache them in memory for the moment user is far enough from the top (in your case) of the list.

Tolga Kartal
  • 617
  • 4
  • 12