PagingController<PageKeyType, T extends PagingItem> class
- Inheritance
-
- Implemented types
-
Methods
-
appendLastPage(List<T> newItems)
→ void
-
Append the last page and set the nextPageKey to null
override
-
appendPage(List<T> newItems, PageKeyType? nextPageKey)
→ void
-
Append new items to the current list and set the next page key
override
-
appendRefreshPage(List<T> newItems, PageKeyType? nextPageKey)
→ void
-
override
-
build(PageKeyType arg)
→ PagingState<PageKeyType, T>
-
Initialize an AsyncNotifier.
override
-
forceRefresh({bool keepPreviousData = false, PageKeyType? newArg})
→ void
-
-
keepAlive()
→ void
-
-
listenSelf(void listener(PagingState<PageKeyType, T>? previous, PagingState<PageKeyType, T> next), {void onError(Object error, StackTrace stackTrace)?})
→ void
-
Listens to changes on the value exposed by this provider.
inherited
-
loadError(dynamic error)
→ void
-
Updates the state with an error when an error occurs while loading data.
This method is used to handle errors that occur during the data loading process.
It keeps the current item list and next page key unchanged, but sets the error
to the provided error object.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onGoing()
→ void
-
Update the state to indicate that data loading is in progress
override
-
pullRefresh()
→ void
-
-
refresh(PageKeyType firstPageKey)
→ void
-
Reset the state to the initial state (clear items and reset to the first page key)
override
-
shouldRequestNextPage(int currentIndex)
→ bool
-
Determine whether the next page should be fetched based on the current index
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateItemAt(int index, T updatedItem)
→ void
-
Update a specific item in the list at the given index
override
-
updateShouldNotify(PagingState<PageKeyType, T> previous, PagingState<PageKeyType, T> next)
→ bool
-
A method invoked when the state exposed by this Notifier changes.
It compares the previous and new value, and return whether listeners
should be notified.
inherited