SfDataPager constructor
const
SfDataPager({
- required double pageCount,
- required DataPagerDelegate delegate,
- Key? key,
- Axis direction = Axis.horizontal,
- double itemWidth = 50.0,
- double itemHeight = 50.0,
- EdgeInsetsGeometry itemPadding = const EdgeInsets.all(5),
- bool firstPageItemVisible = true,
- bool lastPageItemVisible = true,
- bool nextPageItemVisible = true,
- bool previousPageItemVisible = true,
- int visibleItemsCount = 5,
- int initialPageIndex = 0,
- DataPagerItemBuilderCallback<
Widget> ? pageItemBuilder, - ValueChanged<
int?> ? onRowsPerPageChanged, - List<
int> availableRowsPerPage = const <int>[10, 15, 20], - DataPagerController? controller,
Creates a widget describing a datapager.
The pageCount
and delegate
argument must be defined and must not
be null.
Implementation
const SfDataPager(
{required this.pageCount,
required this.delegate,
Key? key,
this.direction = Axis.horizontal,
this.itemWidth = 50.0,
this.itemHeight = 50.0,
this.itemPadding = const EdgeInsets.all(5),
this.navigationItemHeight = 50.0,
this.navigationItemWidth = 50.0,
this.firstPageItemVisible = true,
this.lastPageItemVisible = true,
this.nextPageItemVisible = true,
this.previousPageItemVisible = true,
this.visibleItemsCount = 5,
this.initialPageIndex = 0,
this.pageItemBuilder,
this.onPageNavigationStart,
this.onPageNavigationEnd,
this.onRowsPerPageChanged,
this.availableRowsPerPage = const <int>[10, 15, 20],
this.controller})
: assert(pageCount > 0),
assert(itemHeight > 0 && itemWidth > 0),
assert(availableRowsPerPage.length != 0),
assert((firstPageItemVisible ||
lastPageItemVisible ||
nextPageItemVisible ||
previousPageItemVisible) &&
(navigationItemHeight > 0 && navigationItemWidth > 0)),
super(key: key);