CenterPagingList<PageKey, Value> constructor

const CenterPagingList<PageKey, Value>({
  1. Key? key,
  2. required CenterDataSource<PageKey, Value> dataSource,
  3. required TypedWidgetBuilder<Value> builder,
  4. ExceptionWidgetBuilder? errorBuilder,
  5. Widget? initialLoadingWidget,
  6. Widget? emptyWidget,
  7. required Widget prependLoadStateBuilder(
    1. BuildContext context,
    2. bool hasMore,
    3. bool isLoading
    ),
  8. required Widget appendLoadStateBuilder(
    1. BuildContext context,
    2. bool hasMore,
    3. bool isLoading
    ),
  9. EdgeInsets padding = EdgeInsets.zero,
  10. bool autoLoadPrepend = true,
  11. bool autoLoadAppend = true,
  12. Axis scrollDirection = Axis.vertical,
  13. bool reverse = false,
  14. ScrollController? controller,
  15. bool? primary,
  16. ScrollPhysics? physics,
  17. ScrollBehavior? scrollBehavior,
  18. bool shrinkWrap = false,
  19. ScrollCacheExtent? scrollCacheExtent,
  20. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  21. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  22. Clip clipBehavior = Clip.hardEdge,
})

Creates a CenterPagingList.

Implementation

const CenterPagingList({
  super.key,
  required this.dataSource,
  required this.builder,
  this.errorBuilder,
  this.initialLoadingWidget,
  this.emptyWidget,
  required this.prependLoadStateBuilder,
  required this.appendLoadStateBuilder,
  this.padding = EdgeInsets.zero,
  this.autoLoadPrepend = true,
  this.autoLoadAppend = true,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.controller,
  this.primary,
  this.physics,
  this.scrollBehavior,
  this.shrinkWrap = false,
  this.scrollCacheExtent,
  this.dragStartBehavior = DragStartBehavior.start,
  this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  this.clipBehavior = Clip.hardEdge,
}) : _separatorBuilder = null;