Pagination constructor
Pagination({
- required ScrollController controller,
- required OnLoad onLoad,
- required OnLoading onLoading,
- double preload = 1000,
Constructor for Pagination.
- controller: Scroll controller for the associated ListView.
- onLoad: Callback to be triggered when loading more items is required.
- onLoading: Asynchronous callback to determine if loading is in progress.
- preload: The distance from the end at which preloading should be triggered.
Implementation
Pagination({
required this.controller,
required this.onLoad,
required this.onLoading,
this.preload = 1000,
}) {
controller.addListener(_checker);
}