KeysetPagination<Record, Query, LoadResult> mixin
Implements the loading of the next page of records based on previously loaded records.
In the list of mixins, it should be placed after RecordsLoader
.
- Superclass constraints
- RecordsLoader<
Record, Query, LoadResult>
- RecordsLoader<
Properties
-
actualizeCompleter
↔ Completer<
void> ? -
Completer to indicate that the list is being actualized.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isListClosed ↔ bool
-
Indicates that the closeList function has been called.
getter/setter pairinherited
- loadStrategy → LoadStrategy
-
The loading strategy by which
KeysetPagination
is working.no setter - replaceOperationId ↔ int
-
The identifier of the current list.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildNextPageQuery(
LoadingKey loadingKey) → Query -
Based on
loadingKey
, the function should build aQuery
object that will be used to load the next page of the list by theperformLoadingQuery()
function. -
closeList(
) → void -
Stops all processes in the list controller.
inherited
-
getCompleteReason(
LoadingKey loadingKey) → Future< CompleteReason?> -
Returns the reason why the record loading, identified by
the
loadingKey
, was completed.inherited -
getListStage(
LoadingKey loadingKey) → ListStage -
The function must convert the current state of the list into an object
representing the current stage of the list (
ListStage.idle()
,ListStage.error()
,ListStage.loading()
,ListStage.complete()
). -
isAnyRecordsLoading(
) → bool -
Tells whether any records are being loaded at the moment.
inherited
-
isLoadSucessful(
LoadingKey loadingKey) → bool? -
Indicates whether the loading of the records identified with
the
loadingKey
key has succeeded.inherited -
isRecordsLoading(
LoadingKey loadingKey, {Query? query}) → bool -
Tells whether the loading of records is identified by the
loadingKey
and thequery
is currently being executed.inherited -
loadNextPage(
[LoadingKey loadingKey = RecordsLoader.defaultLoadingKey]) → void - Initiates the loading of the next page of records.
-
loadRecords(
Query query, {LoadingKey loadingKey = defaultLoadingKey}) → void -
Initiates a loading of records limited by the
query
and identified byloadingKey
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onRecordsLoadCancel(
{required Query query, required LoadingKey loadingKey}) → void -
Called in case of a loading cancellation.
inherited
-
onRecordsLoadStart(
{required Query query, required LoadingKey loadingKey}) → void -
Called at the beginning of loading.
inherited
-
performLoadQuery(
{required Query query, required LoadingKey loadingKey}) → Future< LoadResult> -
The function is responsible for retrieving data from a source.
inherited
-
putLoadResultToState(
{required Query query, required LoadResult loadResult, required LoadingKey loadingKey}) → void -
The function needs an implementation of adding loaded records to
the list state.
inherited
-
repeatQuery(
[LoadingKey loadingKey = defaultLoadingKey]) → void -
Initiates a repeat of a failed loading attempt identified by
the
loadingKey
key.inherited -
repeatUnsuccessfulQueries(
) → void -
Initiates a repeat of all failed loading attempts.
inherited
-
resetController(
) → void -
Interrupts all processes occurring in the list controller: of loading
and updating records.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
waitAllLoadsToComplete(
) → Future< void> -
Returns Future, which completes either immediately if there are no other
loads, or upon completion of all loads.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited