UPaginatedList<T> constructor

const UPaginatedList<T>({
  1. required Future<List<T>> fetch(
    1. int page
    ),
  2. required Widget itemBuilder(
    1. BuildContext context,
    2. T item,
    3. int index
    ),
  3. Key? key,
  4. int pageSize = 20,
  5. int firstPage = 1,
  6. Widget? separator,
  7. EdgeInsetsGeometry? padding,
  8. Widget? empty,
  9. Widget? header,
  10. ScrollController? controller,
  11. bool shrinkWrap = false,
  12. ScrollPhysics? physics,
})

A page shorter than pageSize means there is no more data.

Implementation

const UPaginatedList({
  required this.fetch,
  required this.itemBuilder,
  super.key,
  this.pageSize = 20,
  this.firstPage = 1,
  this.separator,
  this.padding,
  this.empty,
  this.header,
  this.controller,
  this.shrinkWrap = false,
  this.physics,
});