RecordsLoader<Record, Query, LoadResult> mixin

Implements the loading of data for the list from a specified source. Whether it is a local database or a remote server.

Superclass Constraints

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

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.
isAnyRecordsLoading() bool
Tells whether any records are being loaded at the moment.
isLoadSucessful(LoadingKey loadingKey) bool?
Indicates whether the loading of the records identified with the loadingKey key has succeeded.
isRecordsLoading(LoadingKey loadingKey, {Query? query}) bool
Tells whether the loading of records is identified by the loadingKey and the query is currently being executed.
loadRecords(Query query, {LoadingKey loadingKey = defaultLoadingKey}) → void
Initiates a loading of records limited by the query and identified by loadingKey.
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.
onRecordsLoadStart({required Query query, required LoadingKey loadingKey}) → void
Called at the beginning of loading.
performLoadQuery({required Query query, required LoadingKey loadingKey}) Future<LoadResult>
The function is responsible for retrieving data from a source.
putLoadResultToState({required Query query, required LoadResult loadResult, required LoadingKey loadingKey}) → void
The function needs an implementation of adding loaded records to the list state.
repeatQuery([LoadingKey loadingKey = defaultLoadingKey]) → void
Initiates a repeat of a failed loading attempt identified by the loadingKey key.
repeatUnsuccessfulQueries() → void
Initiates a repeat of all failed loading attempts.
resetController() → void
Interrupts all processes occurring in the list controller: of loading and updating records.
override
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.
override

Operators

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

Constants

defaultLoadingKey → const LoadingKey
Default key for loading operations.