TListControllerPagination<T, K> extension
Extension providing pagination functionality for TListController.
Handles both client-side and server-side pagination with methods to:
- Navigate between pages
- Change items per page
- Load more items (infinite scroll)
- Refresh data
- Handle search
Example:
// Navigate pages
controller.goToNextPage();
controller.goToFirstPage();
// Change page size
controller.handleItemsPerPageChange(25);
// Infinite scroll
controller.handleLoadMore();
// Search
controller.handleSearchChange('query');
// Get pagination info
print(controller.paginationInfo);
// "Showing 1 to 10 of 100 entries"
- on
-
- TListController<
T, K>
- TListController<
Properties
-
advancedSearch
→ Map<
String, dynamic> ? -
Available on TListController<
Current advanced search filters.T, K> , provided by the TListControllerPagination extensionno setter - canGoToNextPage → bool
-
Available on TListController<
Whether there is a next page. For cursor pagination, checks hasMoreItems (from server's hasNextPage). For offset pagination, checks if page < totalPages.T, K> , provided by the TListControllerPagination extensionno setter - canGoToPreviousPage → bool
-
Available on TListController<
Whether there is a previous page. For cursor pagination, checks if there's cursor history. For offset pagination, checks if page > 1.T, K> , provided by the TListControllerPagination extensionno setter - computedItemsPerPage → int
-
Available on TListController<
The computed items per page (adjusted for last page).T, K> , provided by the TListControllerPagination extensionno setter - currentCursor → String?
-
Available on TListController<
Current cursor for cursor-based pagination.T, K> , provided by the TListControllerPagination extensionno setter -
cursorHistory
→ List<
String> -
Available on TListController<
Cursor history stack for backward navigation.T, K> , provided by the TListControllerPagination extensionno setter - hasMoreItems → bool
-
Available on TListController<
Whether there are more items to load.T, K> , provided by the TListControllerPagination extensionno setter - isCursorPagination → bool
-
Available on TListController<
T, K> , provided by the TListControllerPagination extensionno setter - isFirstPage → bool
-
Available on TListController<
Whether this is the first page.T, K> , provided by the TListControllerPagination extensionno setter - isLastPage → bool
-
Available on TListController<
Whether this is the last page.T, K> , provided by the TListControllerPagination extensionno setter - itemsPerPage → int
-
Available on TListController<
The number of items per page.T, K> , provided by the TListControllerPagination extensionno setter - nextCursor → String?
-
Available on TListController<
Next cursor for cursor-based pagination.T, K> , provided by the TListControllerPagination extensionno setter - page → int
-
Available on TListController<
The current page number (1-indexed).T, K> , provided by the TListControllerPagination extensionno setter - pageEndedAt → int
-
Available on TListController<
The ending index of the current page.T, K> , provided by the TListControllerPagination extensionno setter - pageStartedAt → int
-
Available on TListController<
The starting index of the current page.T, K> , provided by the TListControllerPagination extensionno setter - paginationInfo → String
-
Available on TListController<
Human-readable pagination information. For cursor pagination (when totalItems is 0 or unavailable), shows current page info. For offset pagination, shows range and total.T, K> , provided by the TListControllerPagination extensionno setter - totalDisplayItems → int
-
Available on TListController<
The number of items currently displayed.T, K> , provided by the TListControllerPagination extensionno setter - totalItems → int
-
Available on TListController<
The total number of items.T, K> , provided by the TListControllerPagination extensionno setter - totalPages → int
-
Available on TListController<
The total number of pages.T, K> , provided by the TListControllerPagination extensionno setter
Methods
-
computeItemsPerPageOptions(
List< int> options) → List<int> -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
goToFirstPage(
) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
goToLastPage(
) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
goToNextPage(
) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
goToPreviousPage(
) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
handleAdvancedSearchChange(
Map< String, dynamic> filters) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
handleItemsPerPageChange(
int newItemsPerPage) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
handleLoadMore(
) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
handlePageChange(
int newPage) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
handleRefresh(
) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
handleSearchChange(
String search) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension -
handleSearchImmediate(
String search) → void -
Available on TListController<
T, K> , provided by the TListControllerPagination extension