Flutter just provide an estimated max scroll extent of the list view. Therefore it might be difficult to directly jump to the bottom of the list view without reversing the list view.
By override a small piece of code can make this possible. The point is that RenderSliverList only stores "useful" items and this leads to the unprecise estimation of other "unuseful" items. Thus, considering every item as useful will make the estimation precise.
Please note that this modification may affect the performance of the rendering
an example based on official get-started example which will jump to bottom after every pull-up-to-refresh and jump to top after every pull-down-to-refresh.
import this repository into the project
loaded_list_view:
git:
url: git://github.com/DawenZhang/LoadedListView.git
then use it somewhere in the code
import 'package:loaded_list_view/loaded_list_view.dart';
.
.
.
LoadedListView.separated(
controller: ,
itemCount: ,
separatorBuilder: ,
itemBuilder: ,
);
.
.
.
_controller.position.maxScrollExtent
better use with DualRefreshIndicator