LoadMoreController constructor

const LoadMoreController({
  1. Key? key,
  2. required Future<void> onLoad()?,
  3. double refreshTriggerPullDistance = 76,
  4. double refreshIndicatorExtent = 56,
  5. RefreshControlIndicatorBuilder? builder = CupertinoSliverRefreshControl.buildRefreshIndicator,
  6. bool autoLoad = false,
})

if the autoLoad argument be true:

  • onLoad will be called when viewport not filled
  • onLoad will be called when the sliver reach the cacheExtent of the viewport other arguments work like those of CupertinoSliverRefreshControl

Implementation

const LoadMoreController({
  super.key,
  required this.onLoad,
  this.refreshTriggerPullDistance = 76,
  this.refreshIndicatorExtent = 56,
  this.builder = CupertinoSliverRefreshControl.buildRefreshIndicator,
  this.autoLoad = false,
})  : assert(refreshTriggerPullDistance > 0.0),
      assert(refreshIndicatorExtent >= 0.0),
      assert(
        refreshTriggerPullDistance >= refreshIndicatorExtent,
        'The refresh indicator cannot take more space in its final state '
        'than the amount initially created by overscrolling.',
      );