I have CustomScrollView and in it Two SliverList, it's because when I scroll to the top and I download new elements to list, these new elements are added to top list and its mainting scroll on bottom list (maintating on top of bottom list) cause CustomScrollView have center on bottom list.
I'm usin bloc around the custom scroll view for elements that im rendering. Problem is that when I download new elements on background and person is scrolled in second list it immedietly gets scrolled to top of that second list. I dont want that, I want to keep him on his scrolled position and just inform him "Hey there are new information on top".
CustomScrollView(
center: _mainListKey,
controller: widget.scrollController,
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) =>
NewElement(),
childCount: newElements?.length ?? 0,
),
),
SliverList(
key: _mainListKey,
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) => OldElement(),
childCount: oldElements.length,
),
),
],
),