PaginationDelegate class

Constructors

PaginationDelegate({required int itemCount, required IndexedWidgetBuilder itemBuilder, WidgetBuilder? loadMoreLoadingBuilder, ErrorWidgetBuilderCallback? loadMoreErrorBuilder, WidgetBuilder? loadMoreNoMoreItemsBuilder, WidgetBuilder? firstPageLoadingBuilder, ErrorWidgetBuilderCallback? firstPageErrorBuilder, WidgetBuilder? firstPageNoItemsBuilder, bool isLoading = false, bool hasError = false, bool hasReachedMax = false, required VoidCallback onFetchData, Duration debounceDuration = defaultDebounceDuration, int invisibleItemsThreshold = defaultInvisibleItemsThreshold, bool fetchDataOnStart = true})
A class that represents a pagination delegate for building paginated layouts.

Properties

debounceDuration Duration
The duration for debouncing the fetch data call.
final
effectiveItemCount int
Returns the effective count of items for the pagination delegate.
no setter
fetchAtIndex int
Returns the index at which data should be fetched.
no setter
fetchDataOnStart bool
Indicates whether data should be fetched when the paginated layout is created.
final
firstPageErrorBuilder ErrorWidgetBuilderCallback?
A builder function that builds an error indicator widget for the first page.
final
firstPageLoadingBuilder WidgetBuilder?
A builder function that builds a loading indicator widget for the first page.
final
firstPageNoItemsBuilder WidgetBuilder?
A builder function that builds a no items found indicator widget for the first page.
final
hasError bool
Indicates whether the paginated layout has encountered an error.
final
hashCode int
The hash code for this object.
no setteroverride
hasReachedMax bool
Indicates whether the paginated layout has reached the maximum page.
final
invisibleItemsThreshold int
The threshold for the number of invisible items to trigger fetching more data.
final
isLoading bool
Indicates whether the paginated layout is in a loading state.
final
itemBuilder IndexedWidgetBuilder
A builder function that builds an item widget at the given index.
final
itemCount int
The total number of items in the paginated layout.
final
lastItem int
Returns the index of the last item in the pagination delegate's items.
no setter
loadMoreErrorBuilder ErrorWidgetBuilderCallback?
A builder function that builds an error indicator widget.
final
loadMoreLoadingBuilder WidgetBuilder?
A builder function that builds a loading indicator widget.
final
loadMoreNoMoreItemsBuilder WidgetBuilder?
A builder function that builds a no more items indicator widget.
final
notError bool
Returns whether the pagination delegate has not encountered an error.
no setter
notLoading bool
Returns whether the pagination delegate is not in a loading state.
no setter
notReachedMax bool
Returns whether the pagination delegate has not reached the maximum page.
no setter
onFetchData VoidCallback
A callback function that is called when data needs to be fetched.
final
paginationStatus → PaginationStatus
Returns the current status of the pagination delegate.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(covariant PaginationDelegate other) bool
The equality operator.
override