Pagination constructor

Pagination({
  1. required ScrollController controller,
  2. required OnLoad onLoad,
  3. required OnLoading onLoading,
  4. 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);
}