EntityPaginationEvent<O extends Object> class
sealed
An event of an EntityPagination. See EntityPagination.onEvent.
Delivered synchronously, at the point where it happens and in order, so
it is also correct for a synchronous EntityPageLoader. To consume it as a
Stream instead, forward it: onEvent: myEventStream.add.
Every event but EntityPaginationReset refers to a page, and is an EntityPaginationPageEvent. Switch over it exhaustively:
switch (event) {
case EntityPaginationPageLoading(:var page):
print('fetching page $page...');
case EntityPaginationPageLoaded(:var page, :var entries):
print('page $page: ${entries.length} entries');
case EntityPaginationPageError(:var page, :var error):
print('page $page failed: $error');
case EntityPaginationPageSkipped(:var page, :var reason):
print('page $page not fetched: ${reason.name}');
case EntityPaginationEnd(:var totalLength):
print('done: $totalLength entries');
case EntityPaginationReset(:var discardedPages):
print('discarded ${discardedPages.length} pages');
}
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- limit → int
-
The page size. Same as
pagination.limit.no setter -
pagination
→ EntityPagination<
O> -
The EntityPagination that emitted this event.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited