FPagination constructor
const
FPagination({
- FPaginationController? controller,
- FPaginationStyle style()?,
- Widget? previous,
- Widget? next,
- int? initialPage,
- int? pages,
- ValueChanged<
int> ? onChange, - Key? key,
Creates an FPagination.
Implementation
const FPagination({
this.controller,
this.style,
this.previous,
this.next,
this.initialPage,
this.pages,
this.onChange,
super.key,
}) : assert(
controller == null || initialPage == null,
'Cannot provide both controller and initialPage. To fix, set the page directly in the controller.',
),
assert(
controller == null || pages == null,
'Cannot provide both controller and pages. To fix, set the pages directly in the controller.',
),
assert(initialPage == null || initialPage >= 0, 'initialPage ($initialPage) must be >= 0'),
assert(
initialPage == null || pages == null || initialPage < pages,
'initialPage ($initialPage) must be < pages ($pages)',
),
assert(pages == null || pages > 0, 'pages ($pages) must be > 0');