OffsetPagination<Record, Query, LoadResult, Offset> mixin
Implements the loading of list records based on offset.
Offset, for example, can be int with page order number.
In the mixins list, it should go 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
- 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
-
buildOffsetQuery(
Offset offset) → Query -
Based on
offset, the function should build aQueryobject that will be used to load the list page by theloadRecords()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 -
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
loadingKeykey has succeeded.inherited -
isRecordsLoading(
LoadingKey loadingKey, {Query? query}) → bool -
Tells whether the loading of records is identified by the
loadingKeyand thequeryis currently being executed.inherited -
loadPage(
Offset offset) → void -
Initiates page loading by
offset. -
loadRecords(
Query query, {LoadingKey loadingKey = defaultLoadingKey}) → void -
Initiates a loading of records limited by the
queryand identified byloadingKey.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offsetToLoadingKey(
Offset offset) → LoadingKey -
Should generate a loading key based on the
offset. -
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
loadingKeykey.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