InfiniteScrollManager<T> class abstract

A generic abstract class for handling infinite scrolling in lists. T is the type of items being displayed.

Constructors

InfiniteScrollManager({List<T>? initialItems, int? totalItems, int? totalPages})
Creates an InfiniteScrollManager with optional initial state.

Properties

currentPage → int
Getter for current page
no setter
emptyListIcon → Widget
svg.vec format expected (cf EmptyScreenLayout)
no setter
hashCode → int
The hash code for this object.
no setterinherited
isLoading → bool
Getter for loading state
no setter
items → List<T>
Getter for items
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalItems → int?
Getter for total items
no setter
totalPages → int?
Getter for total pages
no setter

Methods

buildItem({required BuildContext context, required T item}) → Widget
Displays an item.
canLoadMore() → bool
emptyListExplanation(AppLocalizations appLocalizations) → String
emptyListTitle(AppLocalizations appLocalizations) → String
fetchData(int pageNumber) → Future<void>
Fetches data for a specific page
fetchInit(BuildContext context) → Future<void>
formattedItemCount(BuildContext context, int loadedItems, int? totalItems) → String
Returns a formatted item count (e.g., "25 of 100 items")
loadInitiallyIfNeeded(BuildContext context) → Future<void>
Load initial data only if the list is empty
loadMore(BuildContext context) → Future<void>
Load more items (next page)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
updateItems({required List<T>? newItems, required int? pageNumber, required int? totalItems, required int? totalPages}) → void
Update the list with new items and pagination info

Operators

operator ==(Object other) → bool
The equality operator.
inherited