AnimatedInfinitePaginationController<T> mixin
Properties
-
emptyList
→ MutableLiveData<
bool> -
check if there is no items after fetch data
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCached → bool
-
detect if last fetched data is cached data or remote data
send to server new request to fetch new page-list when the last fetched data is not cached
no setter
-
items
→ MutableLiveData<
List< PaginationModel< >T> > -
observable data holder for displayed items in UI.
latefinal
- lastPage → bool
-
detect if current page is last page -> don't load more data if lastPage is true
no setter
- page ↔ int
-
current page.
getter/setter pair
-
paginationState
→ MutableLiveData<
PaginationState< T> > -
pagination state.
latefinal
- refreshing ↔ bool
-
refreshing state
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- total ↔ int
-
the total items count (get from response list).
getter/setter pair
Methods
-
areItemsTheSame(
T a, T b) → bool - decide whether two object represent the same Item.
-
deleteItem(
int index) → void -
remove item by
index
from items -
emitState(
PaginationState< T> state) → void - emit new PaginationState to reflect it in UI.
-
fetchData(
int page) → Future< void> - called by child to fetch data from repository.
-
fetchNewChunk(
{int? page}) → Future< void> - fetch new items list.
-
incrementPage(
) → void - increment pagination current page
-
insertItem(
int index, T item) → void -
insert new
item
to list in specificindex
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → void - reset variables to default value
-
setTotal(
int total) → void - set total items count.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateItem(
T item, {required bool findIndex(T item)}) → void -
update existing
item
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited