PaginationSearchManager<T> class

A class for managing paginated search data.

It provides methods for fetching paginated search items and resetting the manager to its initial state.

The PaginationSearchManager class is generic and can be used with any type of data.

Constructors

PaginationSearchManager({required PaginatedSearchRepository<T> repository, int limitPerPage = 20})
Creates a new instance of PaginationSearchManager.

Properties

changeCurrentKeyword String
Sets the current keyword of search.
no getter
currentKeyword String
The current keyword of search.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasMore bool
Indicates whether there are more items to load.
no setter
isLoading bool
The current loading state.
no setter
items List<T>
The current items.
no setter
limitPerPage int
The maximum number of items to fetch per page.
final
repository PaginatedSearchRepository<T>
The implemented repository for fetching paginated items.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addItem(T item) → void
Method to add an item
fetchNextPageforCurrentSearchKeyword() Future<PaginationResult<T>>
A method for fetching the next page of items in a search.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAt(int index) → void
Method to remove item by index
removeItem(T item) → void
Method to remove an item
reset() → void
Resets the pagination manager to its initial state.
toString() String
A string representation of this object.
inherited
updateItem(int index, T newItem) → void
Method to update an item at a specific index

Operators

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