ZetaPagination constructor

const ZetaPagination({
  1. bool? rounded,
  2. Key? key,
  3. required int pages,
  4. ZetaPaginationType type = ZetaPaginationType.standard,
  5. void onChange(
    1. int value
    )?,
  6. int currentPage = 1,
  7. @Deprecated('Set onChange to null. ' 'Disabled is deprecated as of 0.11.0') bool disabled = false,
  8. String? semanticFirst,
  9. String? semanticPrevious,
  10. String? semanticNext,
  11. String? semanticLast,
  12. String? semanticDropdown,
})

Creates a new ZetaPagination

Implementation

const ZetaPagination({
  super.rounded,
  super.key,
  required this.pages,
  this.type = ZetaPaginationType.standard,
  this.onChange,
  this.currentPage = 1,
  @Deprecated('Set onChange to null. ' 'Disabled is deprecated as of 0.11.0') bool disabled = false,
  this.semanticFirst,
  this.semanticPrevious,
  this.semanticNext,
  this.semanticLast,
  this.semanticDropdown,
})  : assert(
        pages > 0,
        'Pages must be greater than zero',
      ),
      assert(
        currentPage >= 1 && currentPage <= pages,
        'currentPage must be greater than 1 and less than the number of pages',
      );