UIPaging constructor

UIPaging({
  1. required String widget,
  2. Map<String, Object?> params = const {},
  3. required int page,
  4. required int total,
  5. int pageSize = 20,
  6. String prefix = 'page',
  7. Map<String, String> otherQuery = const <String, String>{},
  8. int widthSide = 2,
  9. bool useRequsetQueries = false,
  10. String orderBy = '',
  11. bool orderReverse = false,
})

Creates a new UIPaging instance. The constructor requires a widget identifier, and the page and total number of items. Optional parameters include:

  • pageSize: The number of items per page (default is 20).
  • prefix: The page query parameter name (default is 'page').
  • otherQuery: Additional query parameters.
  • widthSide: The number of pages to show on each side of the current page (default is 2).
  • useRequsetQueries: Whether to include request query parameters.
  • orderBy: The field used for ordering.
  • orderReverse: Whether the order is reversed (descending).

Implementation

UIPaging({
  required super.widget,
  super.params,
  required this.page,
  required this.total,
  this.pageSize = 20,
  this.prefix = 'page',
  this.otherQuery = const <String, String>{},
  this.widthSide = 2,
  this.useRequsetQueries = false,
  this.orderBy = '',
  this.orderReverse = false,
});