list_controller library

Tools for creating list controllers. Supports infinite scroll, pagination, lazy loading, sorting, filtering, synchronization, huge lists, etc. Independent of architecture and widgets used.

Classes

CompleteListStage
Stage indicating that the list is complete and has not any pages to load
DefaultList<T>
Default value for a nullable List property of a copyWith functions.
DefaultListStage
Default value for a nullable ListStage property of a copyWith functions.
ErrorListStage
Stage indicating that loading of the list records was unsuccessful.
HotListChanges<Record, Key>
Contains records to be added to the list and unique identifiers (keys) of records to be removed from the list.
IdleListStage
Stage indicating that the list is idle.
ListEvent
A base class for list controller events.
ListStage
A base class for all the stages the list can be in.
ListState<Record, Query>
Stores the list state.
ListStateMeta
Stores basic information about the list state.
LoadingErrorEvent<Query>
The event can be used when an error occurs in the overridden RecordsLoader.performLoadQuery function.
LoadingListStage
Stage indicating that the list is loading.
LoadNextPageDirectedEvent
Triggers the loading of the next page of records.
LoadNextPageEvent
Triggers the loading of the next page of records.
LoadRecordsEvent<Query>
Initiates the loading of records.
PutLoadResultToStateEvent<Query, LoadResult>
The event must be called from the overridden function RecordsLoader.putLoadResultToState.
RecordsLoadCancelEvent<Query>
The event must be called from the overridden function RecordsLoader.onRecordsLoadCancel. The handler must perform the same actions as those for this function.
RecordsLoadStartEvent<Query>
The event must be called from the overridden function RecordsLoader.onRecordsLoadStart. The handler must perform the same actions as those for this function.
RecordUpdates<T, Key>
Describes changes in the data source.
RepeatQueryEvent
Triggers the reloading of records in case the previous attempt failed.
RepeatUnsuccessfulQueriesEvent
Initiates a rerun of all failed loadings.
ResetEvent<Query>
Triggers the resettings of a list controller.
UpdateHotListEvent<Record, Key>
The event must be called from an overridden function HotList.updateHotList. The handler must perform the same actions as for this function.
Wrapped<T>
A wrapper for nullable properties of a copyWith functions.

Enums

CompleteReason
The reason why the loading of the list records is finished.
LoadStrategy
The loading strategy by which KeysetPagination should work.

Mixins

HotList<Key, Event, DecisionRecord, Record>
Implements the updating (actualization) of individual list entries.
KeysetPagination<Record, Query, LoadResult>
Implements the loading of the next page of records based on previously loaded records.
ListCore<Record>
Provides basic functionality for the other parts of the list controller (mixins), as well as the ability to synchronize actions between them.
OffsetPagination<Record, Query, LoadResult, Offset>
Implements the loading of list records based on offset.
RecordsLoader<Record, Query, LoadResult>
Implements the loading of data for the list from a specified source. Whether it is a local database or a remote server.
RecordsTracker<Record, Update>
Tracks changes of individual records in the list.

Typedefs

LoadingKey = String
Тип ключа Load key type.

Exceptions / Errors

HandledLoadingException
Exception that should be thrown in RecordsLoader.performLoadQuery when record loading fails.
InterruptLoading
Exception that should be thrown in RecordsLoader.performLoadQuery to interrupt the loading process.
UnexpectedLoadingKeyException
Exception to be thrown when a loading key provided to a function is unexpected.
WrongListStateException
Exception to be thrown when the list state is impossible.